Reputation: 4303
When I try to clone a repository from GitHub or Bitbucket, I get an error saying "Could not resolve host: github.com" (or bitbucket.com).
I checked the global .gitconfig file, but it doesn't have an entry for http.proxy. Is it happening because of DNS issues? If so, then how to resolve it?
Upvotes: 1
Views: 1933
Reputation: 1323913
Is it happening because of DNS issues?
If you can browse github.com and look at the content of a repo through the web interface, then your DNS is fine.
Try cloning the repo with the https url, not the ssh one (since ssh can be blocked depending of your environment, meaning [email protected]:username/arepo
won't work)
git clone https://github.com/username/arepo
but if you are using https, try the opposite, and use ssh to see if the issue persists:
git clone [email protected]:username/arepo
(generate an ssh keypair first)
Upvotes: 1