Accessing a git repository via ssh behind a firewall

前端 未结 3 1739
北荒
北荒 2021-01-30 15:25

I would like to access (clone/push/pull) a private (via ssh) git repository while behind a corporate firewall that only allows http proxy access. I have written a robust Java (d

3条回答
  •  误落风尘
    2021-01-30 15:50

    This is my setup working under a Linux machine (localhost on port 18081 is a proxy).

    cat ~/.ssh/config
    Host  github.com
      User git
      ProxyCommand nc -x localhost:18081 -Xconnect %h %p
    

提交回复
热议问题