Finally; git via ssh SOCKS proxy on windows


I managed it to get git work via my ssh proxy tunnel … after min. 5 tries in a period of about 1 year, it finally works :).

Git for Windows:

Proxy Connect Command for Windows:

My “proxyCmd.bat” (e.g. put it into c:\program files\Git\bin):

@echo off
set CONNECT=c:\program files\Git\bin\connect.exe
set PROXY=localhost:815


So all tools installed. You will need a Putty connection to a server with a dynamic SSH Tunnel connection on port 815.

Now we tell git to use the proxyCmd.bat:

git config core.gitproxy "c:\program files\Git\bin\proxyCmd.bat"

Now git should use the ssh SOCKS Tunnel … don’t forget to open the ssh connection :).

If you want to set the git proxy system global, you need to set the environmentvariable GIT_PROXY_COMMAND.

set GIT_PROXY_COMMAND=c:\program files\Git\bin\proxyCmd.bat


Ciao Ephraim

This entry was posted in Misc. Bookmark the permalink.

2 Responses to Finally; git via ssh SOCKS proxy on windows

  1. francis says:

    Thanks a lot, finally solved my problem, it’s so hard to set a proxy on windows :-=)

  2. avin says:

    yes it works!! TY very much!

Leave a Reply

Your email address will not be published. Required fields are marked *