5

I am using raspberrypi terminal using vnc viewer at window and I am trying to clone Git repository. But I am keep getting this error message.

ssh: Could not resolve hostname github.com: Temporary failure in name resolution fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

I've been trying to solve this error for a whole day but i still cannot solve this error.. It would be great to know solutions for this. Thank you

nova26
  • 51
  • 1
  • 1
  • 3
  • 2
    what is content of ```/etc/resolv.conf``` file? you could rewrite such file with content ```nameserver 8.8.8.8``` as a temporary dirty solution but you need to figure out why your dns settings are not configured. – Maxim Sagaydachny Mar 02 '20 at 13:49
  • Thanks for the reply. But i am sorry that i am a starter in this.. could you please tell me more about this content of /etc/resolv.conf ? – nova26 Mar 02 '20 at 14:12
  • you do not need to know about low-level stuff. My suggestion was one-time temporary fix. Most likely you followed some tutorial about setting static IP address. The same tutorial should mention DNS settings as well. I suggest you to read tutorial about network settings (and about DNS in particular) so you could fix this issue permanently without low level hacks. – Maxim Sagaydachny Mar 02 '20 at 14:31
  • Are you or have you been running Vagrant? If so, see if this helps: https://medium.com/@ucadena07/dealing-with-github-ssh-could-not-resolve-hostname-github-com-f5b40220d87d. Alternatively, see if the answer here helps: https://stackoverflow.com/a/38343911/12926834 – captiveCorsair Mar 16 '20 at 14:58

1 Answers1

3

Maybe it is because of your internet access, You can try:

ping google.com

If you get this error again, there was problem in your network configuration or internet access.

I had this problem in ubuntu virtual machine, and it was solved by changing internet network because of router setting.

yasi
  • 397
  • 1
  • 4
  • 14