pull command error : Failed connect to github.com:8080

寵の児 提交于 2019-11-26 16:34:54

问题


I tried to pull repository so that I can merge the changes made to my repository.
But while using the pull command it gives following error:

$ git pull https://github.com/ShrutiRuparel/depot.git master
error: Failed connect to github.com:8080; 
No error while accessing https://github.com/ShrutiRuparel/depot.git/info/refs

fatal: HTTP request failed

I tried setting the http proxy but no change.
push command worked perfectly fine but error with pull command.
Any suggestions?


回答1:


I had the same issue because I forgot to remove my proxy configuration on Git.

git config --global http.proxy

If it returns something you have to unset the value with the following command :

git config --global --unset http.proxy

There is a lot of way to set a proxy for git and maybe this is not the good one. You can also check your environment variable.

echo $http_proxy 

After that, it should works




回答2:


Why are you using https?

For private repo on GitHub, you would use (as shown here):

git clone https://username@github.com/username/project.git

But for a public repo, a simple:

git clone http://github.com/username/project.git

should be enough.



来源:https://stackoverflow.com/questions/5102361/pull-command-error-failed-connect-to-github-com8080

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!