1 git push 卡住
https可以正常推送,而ssh无法推送。
2 测试
怀疑是ssh没有走代理。
# 可用
ssh -o "ProxyCommand=nc -X 5 -x 127.0.0.1:7890 %h %p" -i ~/.ssh/id_rsa_github -T git@github.com
# 不可用
ssh -i ~/.ssh/id_rsa_github -T git@github.com
3 解决
gedit ~/.ssh/config
添加以下配置。
Host github.com
ProxyCommand nc -X 5 -x proxy_host:proxy_port %h %p
Host github.com
ProxyCommand nc -X 5 -x 127.0.0.1:7890 %h %p