-
install socat
-
add git-proxy to your path (e.g.
cp git-proxy ~/bin/
) -
make git-proxy executable (e.g.
chmod u+x git-proxy
) -
add ssh config ssh_config entries to your ssh config (samples for github)
-
edit the proxy address in git-proxy
-
edit the proxy address in ssh_config
-
add git configuration
needed for ssh urls that require a login ([email protected]:someone/something.git)
git config --global core.gitproxy git-proxy
needed for git urls that don't require a login (git://github.com/someone/something.git)
git config --global url.https://github.com/.insteadOf git://github.com/
-
you can now clone the github repo with the git address
Last active
August 29, 2015 14:02
-
-
Save koffeinfrei/82cac4b6b35c33fc4d53 to your computer and use it in GitHub Desktop.
git through proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
_proxy=proxy_address | |
_proxyport=8080 | |
exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host github.com | |
User git | |
Port 22 | |
Hostname github.com | |
TCPKeepAlive yes | |
ProxyCommand socat STDIO PROXY:proxy_address:%h:%p,proxyport=8080 | |
Host ssh.github.com | |
User git | |
Port 443 | |
Hostname ssh.github.com | |
TCPKeepAlive yes | |
ProxyCommand socat STDIO PROXY:proxy_address:%h:%p,proxyport=8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment