Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git doesn't work behind proxy since version 1.7.9

Tags:

git

proxy

Since git 1.7.9 I haven't been able to clone, fetch, or push to repositories through a proxy server. It works well with version 1.7.8, but newer versions, including the latest version, throw this error:

error: Failure when receiving data from the peer while accessing http://github.com/...
fatal: HTTP request failed

I have set http.proxy property in git config, which was sufficient in 1.7.8. The only way I was able to get newer versions of git running was to use cntlm.

What am I doing wrong?

like image 850
user2075606 Avatar asked Feb 15 '13 13:02

user2075606


1 Answers

I am cloning with git1.7.9+ (recently 1.8+) behind proxy.

I don't, however, set http.proxy in the git configuration.
I do, on Windows or Unix, set the environment variables:

HTTP_PROXY=http://user:[email protected]:80/
HTTPS_PROXY=http://user:[email protected]:80/
NO_PROXY=*.domain

And I clone/push/pull GitHub repos without any issue.

like image 70
VonC Avatar answered Nov 05 '22 08:11

VonC