Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # [step 1] create a ssh-proxy
- ssh -D 9999 -qCN user@server.net
- # [step 2] make git connect through the ssh-proxy
- # [current script only]
- export GIT_SSH_COMMAND='ssh -o ProxyCommand="connect -S 127.0.0.1:9999 %h %p"'
- # OR [git global setting]
- git config --global core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:9999 %h %p"'
- # OR [one-time only use]
- git clone -c=core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:9999 %h %p"' git@github.com:user/repo.git
- # OR [current repository use only]
- git config core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:9999 %h %p"'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement