设置 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig
文件中会增加以下条目:
[http "https://github.com"]
proxy = socks5://127.0.0.1:1086
修改 ~/.ssh/config
文件
Host github.com
User git
ProxyCommand nc -v -x 127.0.0.1:1086 %h %p
可以的啊,我在用。
你这个报错是不是设置一下ssh免密登录试试看……