Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LuboVarga/5ad56892c587cc8aaf21222fae25f7bb to your computer and use it in GitHub Desktop.
Save LuboVarga/5ad56892c587cc8aaf21222fae25f7bb to your computer and use it in GitHub Desktop.
Using github through SSH tunnel
# Prerequisites: netcat-openbsd (BSD version of netcat)
$ ssh -fND 127.0.0.1:8081 user@<your-vps>
$ git config --global url."https://github".insteadOf git://github
$ git config --global http.proxy 'socks5://127.0.0.1:8081'
$ echo -e 'Host github.com\nProxyCommand nc -x 127.0.0.1:8081 %h %p' >> ~/.ssh/config

Alternative solutions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment