Finally; git via ssh SOCKS proxy on windows

YEAHA!!!

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:
http://git-scm.com/download

Proxy Connect Command for Windows:
http://bent.latency.net/bent/darcs/goto-san-connect-1.85/src/connect.html

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

"%CONNECT%" -S %PROXY% %*

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 :).

[EDIT]
If you want to set the git proxy system global, you need to set the environmentvariable GIT_PROXY_COMMAND.
e.g.:

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

[/EDIT]

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 *