Git – Configuring Git on Windows to use NTLM proxy authentication

gitmsysgitntlmPROXY

I'm trying to access a repository on Github from a Windows machine that is behind a proxy that requires NTLM authentication. Neither SSH nor the git:// protocol are directly available, so I'm trying to make this work with HTTPS through the proxy.

With the help of NTLM proxy without password? I have been able to make the curl binary supplied with msysgit play nice with the proxy:

curl -U : --proxy-ntlm --proxy xxx.xxx.xx.xx:8080 https://github.com

This is successful and returns the Github home page.

However, I found an article from Feb 2010 Proxying Git that states (emphasis mine):

Unfortunately it appears that curl will always use Basic authentication with the proxy. If your proxy needs something else, perhaps NTLM for a Windows network, then you have a problem. Curl is used to handle all the http transport details and this does support the NTLM authentication method but I know of no method to pass the necessary options to curl. Git makes use of curl via its library binding so it is not enought just to replace the curl executable with a wrapper script.

I know about the core.gitproxy option in the Git configuration, but that appears to only apply to the git:// protocol. Similarly, the http.proxy option sets the address of the proxy, but provides no way to supply the appropriate options to curl.

Best Answer

Try Cntlm. It's a proxy designed to sit between a program that doesn't understand NTLM (e.g., Git) and a proxy that requires NTLM. It does the NTLM authentication so that the app doesn't have to.

I haven't used it so I don't know how well it works.