git doesn't work behind proxy since version 1.7.9

git, proxy

Solution

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:password@proxy.fr.domain:80/
HTTPS_PROXY=http://user:password@proxy.fr.domain:80/
NO_PROXY=*.domain

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

Problem

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?

Original source