Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # [step 1] create a ssh-proxy
  2. ssh -D 9999 -qCN user@server.net
  3.  
  4. # [step 2] make git connect through the ssh-proxy
  5. # [current script only]
  6. export GIT_SSH_COMMAND='ssh -o ProxyCommand="connect -S 127.0.0.1:9999 %h %p"'
  7. # OR [git global setting]
  8. git config --global core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:9999 %h %p"'
  9. # OR [one-time only use]
  10. git clone -c=core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:9999 %h %p"' git@github.com:user/repo.git
  11. # OR [current repository use only]
  12. 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