Virtual Internship Program 2021

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

2

Error Cloning GitHub Repository - Could not resolve host: github.com

I had the error below trying to clone the repository.

fatal: unable to access 'https://github.com/Data-Mavens-io/vinterns2021.git/': Could not resolve host: github.com

1 Comment
Avatar
Discard
Avatar
Leslie Asamoa
-

Hello Abdul-Karim, could you update the question and add in the exact command that you are typing?

Also what terminal are you using to issue the command and what initial setup have you done for your git config?

4 Answers
5
Best Answer

Cloning from a git repo without using setting up an ssh

so what then is an SSH:

Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with SSH.
Now in other to clone a repo without any problems kindly follow these steps:
  • Download GitHub Desktop \Go to GitHub Desktop

  • Sign in with your GitHub account after downloading.

  • Now go to the GitHub Repo to open the repo you want to clone (vinterns2021 - repo name)


  • Now click on the 'code'  button from the above image to select open with GitHub desktop



  • After Opening with GitHub Desktop you would have to accept from the alert box in the browser to open GitHub from your computer.




  • Form the above image you have to select a directory, path, or folder in which to clone the repo or project to.



  • Now after selecting the path to clone the project you navigate or click on the open with visual studio code or open with the text editor you are currently using.

  •  Note: You have to link your GitHub account with visual studio code if you are using it to make things easier


  • Above is where to sign in with your GitHub account in visual studio code.



  • Then you create a README_INITIALS_LAST_FOUR_DIGITS_OF_MOBILE_NUMBER.md after making changes to the repo go to GitHub Desktop to push to main.



  • Now from the above you have click on the 'Commit to main' button to save changes (commit) the push to the main repo



  • After pushing to the repo you might get this message below:



  • Don't worry go ahead and 'fork' the repo. This means you are creating a copy of the remote repository to make changes and after that you have to make a pull request then you will be fine. 


I hope this help 
1 Comment
Avatar
Discard

This really helped. Thanks man

2
Avatar
Andrew Adane
Best Answer

I had a similar issue with regards to cloning the repository.

The error received:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

If that's is the case you can check for existing SSH keys. The link below provides you with information regarding the process.

'https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent'



Avatar
Discard
0
Best Answer

@Leslie Asamoa

I have git installed, and am using the git bash terminal.

I have configured my git with my GitHub's username and email.

But when I try to clone the repository using the git clone command with the link to the repository I get the error above.

But like you asked me to deactivate the VPN on my device, I will do that, retry to clone, and give you whatever feedback I get.

1 Comment
Avatar
Discard
Avatar
Joshua Nyarko Boateng
-

If you could copy the error message and post it here that would be super.

since you are cloning from a repo you don't have right access to it's advisable to use the forking method then after the you make a pull request or you have to set up your GitHub SSH.

0
Best Answer

Thanks for the answers, I will check them out and let you know the outcome.

Avatar
Discard