Skip to content

Instantly share code, notes, and snippets.

@larryli
Last active January 21, 2021 20:35
Show Gist options
  • Save larryli/96365d400185df7d329dd1e48508a861 to your computer and use it in GitHub Desktop.
Save larryli/96365d400185df7d329dd1e48508a861 to your computer and use it in GitHub Desktop.
Git ssh socks proxy
#!/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"' git@github.com: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