设置 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
我找了网上很多教程,最后设置成功了,很简单,现在的git bash里面都包含了connect.exe这个软件,位置在bin下,你只要配置一个config可以了
vi ~/.ssh/config
然后就可以使用ssh,测试方法是
ssh -T git@github.com
,返回successful之类的就成功了