Total Pageviews

Saturday 31 March 2012

git via ssh proxy on windows

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]

from http://thilo.cestona.ro/?p=23

No comments:

Post a Comment