16

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?

2
  • The answer from basgys helped me and I also had to do this: stackoverflow.com/questions/7438313/… Oct 9, 2012 at 22:08
  • Having same issue with bitbucket at the moment, 2 days ago everything was working fine, didn't touch anything, and now VPS rejects connecting to bitbucket, locally connection is fine, remote settings are same for both VPS and local and are correct, VPS has no http(s)_proxy records so --unset didn't help any bit, have no idea what this might be and what to do next.
    – Brock
    Jul 22, 2013 at 12:40

2 Answers 2

46

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
  • 2
    You may also need to remove the https.proxy value as well. Apr 27, 2012 at 14:00
  • 6
    To unset global config, use this command git config --global --unset http.proxy Jul 5, 2013 at 6:41
4

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.

1
  • 1
    some tutorials (like three20) also show git://github.com. Which doesnt seem to work, but changing it to https did
    – owen gerig
    Jul 18, 2012 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.