could not resolve host github.com error while cloning remote repository in git
What I did: I have created a remote repository on Github and I am trying to clone the remote repository on my local machine. While cloning I am providing the clone URL & target folder.
But every time I try to clone, I am getting this error:
Error: "fatal: unable to access 'https://github.com/hyperion057/spring-repo.git/': Could not resolve host: github.com"
What do I need to do to connect to GitHub ?
do i need to configure proxy settings? because my office has got proxy servers.
Yes, you can do so by setting HTTP_PROXY
, and HTTPS_PROXY
environment variables.
See "Syncing with github":
set HTTPS_PROXY=http://<login_internet>:<password_internet>@aproxy:aport
set HTTP_PROXY=http://<login_internet>:<password_internet>@aproxy:aport
set NO_PROXY=localhost,my.company
Note the NO_PROXY
, to allow to access internal site to your company
You also can register that in your git config:
git config --global http.proxy http://<login_internet>:<password_internet>@aproxy:aport
I got a similar error, and it's caused by incorrect proxy setting. This command saved me:
git config --global --unset http.proxy
https version:
git config --global --unset https.proxy
another possibility, I ran into this problem myself. But it was after I had installed a VPN (which was unrelated and running)
turning off the VPN, fixed the issue.
for the record, I was running "Viscosity" VPN on my MacBookPro
链接地址: http://www.djcxy.com/p/4628.html上一篇: 如何在GitHub上合并远程更改?