Hi,
When I try to use git across a cntlm proxy, this works fine with HTTP access. However HTTPS (using WebDAV) fails with a hanging process.
It's not a problem with the proxy server, because this works fine using ntlmaps-0.9.9.0.1 (http://ntlmaps.sourceforge.net/)
This can be easily verified using GitHUB:
Git using HTTP
--------------------------------------------------
export http_proxy=http://127.0.0.1:3128
git config --global http.proxy $http_proxy
git clone http://github.com/hibernate/hibernate-core.git hibernate-core.git
This works fine
Git using HTTPS
--------------------------------------------------
export GIT_CURL_VERBOSE=1
git clone https://USERNAME@github.com/hibernate/hibernate-core.git hibernate-core.git
Cloning into hibernate-core.git...
Password:
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to proxy 127.0.0.1 port 3128 (#0)
* Trying 127.0.0.1... * connected
* Connected to 127.0.0.1 (127.0.0.1) port 3128 (#0)
* Establish HTTP proxy tunnel to github.com:443
> CONNECT github.com:443 HTTP/1.1
Host: github.com:443
User-Agent: git/1.7.3.1.msysgit.0
Proxy-Connection: Keep-Alive
Pragma: no-cache
* 0xb76220 is at send pipe head!
< HTTP/1.1 200 Connection established
< Via: 1.1 GRNAP059N02
< Connection: Keep-Alive
< Proxy-Connection: Keep-Alive
<
* Proxy replied OK to CONNECT request
* successfully set certificate verify locations:
* CAfile: C:\Program Files\Git/bin/curl-ca-bundle.crt
CApath: none
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: O=*.github.com; OU=Domain Control Validated; CN=*.github.com
* start date: 2009-12-11 05:02:36 GMT
* expire date: 2014-12-11 05:02:36 GMT
* subjectAltName: github.com matched
* issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://
certificates.godaddy.com/repository; CN=Go Daddy Secure Certification Authority;
serialNumber=07969287
* SSL certificate verify ok.
> GET /hibernate/hibernate-core.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.3.1.msysgit.0
Host: github.com
Accept: */*
Pragma: no-cache
< HTTP/1.1 200 OK
< Server: nginx/0.7.67
< Date: Wed, 10 Nov 2010 13:40:01 GMT
< Content-Type: application/x-git-upload-pack-advertisement
< Transfer-Encoding: chunked
< Connection: keep-alive
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
<
* Connection #0 to host 127.0.0.1 left intact
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to proxy 127.0.0.1 port 3128 (#0)
* Trying 127.0.0.1... * connected
* Connected to 127.0.0.1 (127.0.0.1) port 3128 (#0)
* Establish HTTP proxy tunnel to github.com:443
> CONNECT github.com:443 HTTP/1.1
Host: github.com:443
User-Agent: git/1.7.3.1.msysgit.0
Proxy-Connection: Keep-Alive
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
-----------
after this, git clone hangs and no further network access happens.
Any news on this issue? I've stuck with the same result :(
no problem here with cntlm 0.91rc6 and github or gitorious or .....
Same problem. ;(
You're right. Because of the headers GIT sent, Cntlm expected a body of unknown length (signalled by closing connection). This is perfectly OK for server replies, but not for request. If client closed the connection after the body, it could never receive any response. A check added to make sure we're considering only replies in this particular branch.
The latest stable version 0.92 (just released) fixes this.