title: Git over HTTPS can do ls-list but cannot clone via HTTP proxy
body: <p>This is a common question/problem, however I am having slightly different problems than others.  I am trying to use git via my http proxy at work.  I have already configured my proxy settings in git:</p>
  
  <pre><code>C:\Program Files (x86)\Git\bin&gt;git config --global -l
  http.proxy=https://c172635b4:password@p01.proxy.local:8080
  </code></pre>
  
  <p>When I issue git ls-remote <a href="https://eric@git.assembla.com/myproj.git" rel="nofollow noreferrer">https://eric@git.assembla.com/myproj.git</a>, it asks me for the password and provides the expected result.  This confirms that git is authenticating via the proxy properly.</p>
  
  <p>However, when I try to do a git clone, I get the following error.</p>
  
  <pre><code>error: RPC failed; result=22, HTTP code = 0
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>I've run it with GIT_CURL_VERBOSE=1 to see the log and I am able to see it authenticating to the NTLM proxy properly until the end:</p>
  
  <pre><code>&lt; HTTP/1.1 407 Proxy Authentication Required
  &lt; Proxy-Authenticate: NTLM TlRMTVNTUAACAAAABgAGADgAAAA1goniA432smdf3mwAAAAAAAAAALAAsAA+AAAABgByFwAAAA9SAEUAUwACAAYAUgBFAFMAAQAYAFcAUwBQAEkAQwBCAEMAQQBBAEEAMAAxAAQAHAByAGUAcwAuAGIAbgBnAGYALgBsAG8AYwBhAGwAAwA2AFcAUwBQAEkAQwBCAEMAQQBBAEEAMAAxAC4AcgBlAHMALgBiAG4AZwBmAC4AbABvAGMAYQBsAAUAHAByAGUAcwAuAGIAbgBnAGYALgBsAG8AYwBhAGwABwAIAGq6JY+ND84BAAAAAA==
  &lt; Cache-Control: no-cache
  &lt; Pragma: no-cache
  &lt; Content-Type: text/html; charset=utf-8
  &lt; Proxy-Connection: Keep-Alive
  &lt; Set-Cookie: BCSI-CS-dcfa3879f83cfd49=2; Path=/
  &lt; Connection: Keep-Alive
  &lt; Content-Length: 3742
  &lt; 
  * Ignore 3742 bytes of response-body
  * NTLM send, close instead of sending 2531 bytes
  * Received HTTP code 407 from proxy after CONNECT
  * About to connect() to proxy p01.proxy.local port 8080 (#0)
  *   Trying 172.31.132.18... * connected
  * Connected to p01.proxy.local (172.31.132.18) port 8080 (#0)
  * Establish HTTP proxy tunnel to git.assembla.com:443
  * Proxy auth using NTLM with user 'c172635b4'
  * Server auth using Basic with user 'eric'
  &gt; CONNECT git.assembla.com:443 HTTP/1.1
  Host: git.assembla.com:443
  Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAIIAAAAYABgAmgAAAAYABgBYAAAAEAAQAF4AAAAUABQAbgAAABAAEACyAAAANYKI4gYBsR0AAAAPN9Y0OSiIbF7a4dr8yIqv9WwAYgBnAGMANgAxADIANwAxAGIANAAyAFUAQQAxADMAOAAxAEQAUwA1ADKgzMJlkKLlAAAAAAAAAAAAAAAAAAAAAHVtirzD6urrzJLWZ73HGWxFUEd926He985LMc+KepdWBDDgQQBESv8=
  User-Agent: git/1.7.10.5997.gaa4aa
  Proxy-Connection: Keep-Alive
  Content-Type: application/x-git-upload-pack-request
  Accept: application/x-git-upload-pack-result
  Content-Encoding: gzip
  
  &lt; HTTP/1.1 407 Proxy Authentication Required
  &lt; Proxy-Authenticate: NTLM
  * Authentication problem. Ignoring this.
  &lt; Cache-Control: no-cache
  &lt; Pragma: no-cache
  &lt; Content-Type: text/html; charset=utf-8
  &lt; Proxy-Connection: close
  &lt; Set-Cookie: BCSI-CS-dcfa3879f83cfd49=2; Path=/
  &lt; Connection: close
  &lt; Content-Length: 3742
  &lt; 
  * Closing connection #0
  * HTTP response code said error
  </code></pre>
  
  <p>I am running:</p>
  
  <pre><code>git version 1.7.10.msysgit.1
  
  curl 7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8r zlib/1.2.3
  Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
  Features: Largefile NTLM SSL SSPI libz
  </code></pre>
  
  <p>I did find one other posting on <a href="https://stackoverflow.com/questions/12979720/git-over-https-can-ls-list-but-cannot-clone">SO</a>, and this is as close to a duplicate as possible of that question, but there is no accepted solution there, nor are any of the suggestions applicable either.</p>
  
  <p>Does anyone have any suggestions how to further debug the issue and/or get this working?  </p>