This repository has been archived by the owner. It is now read-only.

Git and Proxy Servers

adamkerz edited this page Mar 12, 2015 · 1 revision

You can connect GIT to a proxy server by running the following:

git config http.proxy http://host:port

Local proxy/CNTLM:

If you use a local proxy such as CNTLM to authenticate through a corporate proxy server or for whatever other reason, you should be aware that you may experience a several minute delay in GIT making the first connection to the proxy. This could be caused by GIT/cURL resolving localhost to an IPv6 address first ::1 and trying to connect to that before timing out (in my case, after 2.5 minutes). The reason that Windows doesn't instantly refuse the connection is not known. After the timeout, cURL will then try the IPv4 version of If your local proxy only listens on the IPv4 address (which seems a common occurrence), make sure you define the proxy as such:

git config http.proxy


To troubleshoot other problems with your proxy, you can set the following environment variables:


Then run the command again and you will get much more information about what GIT and the cURL library are up to.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.