Last active
January 21, 2021 20:35
-
-
Save larryli/96365d400185df7d329dd1e48508a861 to your computer and use it in GitHub Desktop.
Git ssh socks 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 | |
export GIT_SSH_COMMAND='ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"' | |
git config --global core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"' | |
git clone -c=core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"' [email protected]:larryli/ipv4.git | |
git config core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment