Host windows.local has VPN connection which is granted with git repository.
- Setup Socks/Socks5 proxy
1 | ssh-copy-id -i id_rsa.pub darling@windows.local |
- -q: quiet mode, don’t output anything locally
- -C: compress data in the tunnel, save bandwidth
- -N: do not execute remote commands, useful for just forwarding ports
- -f: keep it running in the background
If PasswordAuthentication is enforced, and pubilc key authentication in SSH Server is not supported, try:
1 | sshpass -f ~/.ssh/windows.passwd ssh -D 3128 -q -C -N -f darling@windows.local |
- Configure
gitwith Sock/Socks5 proxy
1 | git config http.proxy 'socks5://localhost:3128' |
Then can access git repository via proxy both on command line and in UI client.