0

I'm doing the Git and Github google course on coursera, and I'm new at this. I already have a Github account, but never used it from the terminal.

Following the instructions of the course, I'm trying to clone a repository I have in my github account to my Git in the Ubuntu terminal. Following the command:

git clone https://github.com/username/repositoryname.git Cloning into 'repositoryname'... fatal: unable to access 'https://github.com/username/repositoryname: Could not resolve host: github.com

I have a user in Git that is the same as in Github, and I'm using the email address that github provides to me to use in Git.

The teacher places the git clone command and the https address, then it asks for username and password, and he directly gets it done ok. but I get an error.

What is wrong here and how can I fix it?

Note: Mi pc is Windows OS, working on Ubuntu for windows, and if I use gitbash I get the same error.

What my teacher sees What I see

Mer
  • 1
  • 1
  • The probleme seems to be linked to dns resolution, can you show /etc/resolv.conf ? does ping github.com show anything ? – Ant0ine64 Aug 24 '23 at 14:36
  • @Ant0ine64 it says: ping: github.com: Temporary failure in name resolution – Mer Aug 24 '23 at 14:49
  • so the problem isn't related to git in any way, you could search for "dns not resolving on wsl" (I assume this is what you use ?) – Ant0ine64 Aug 24 '23 at 14:52
  • how do I do this " show /etc/resolv.conf "? If I use that command doesn't work. I'm understanding that my ubuntu does not have connection to internet. How do I fix this? – Mer Aug 24 '23 at 15:08
  • In linux to print a file to the terminal you can do `cat /etc/resolv.conf`, this should contain at least one `nameserver` entry indicating the dns server used. Sorry if I did not gave you enough information to do so – Ant0ine64 Aug 24 '23 at 15:10
  • it gives me a nameserver. I reading the other post you gave me. I think that is what is happening.Thanks for your help! That's ok. I'm new to this, so I try to learn from everything people say! :) – Mer Aug 24 '23 at 15:14
  • I fixed it with this! https://stackoverflow.com/a/67756837/21419855 So simple and easy! Thanks!!! – Mer Aug 24 '23 at 15:35

0 Answers0