美文网首页
公司内网使用git clone报错ssh连接超时

公司内网使用git clone报错ssh连接超时

作者: u14e | 来源:发表于2017-09-05 10:29 被阅读775次

ssh -T git@github.com 测试ssh,报连接超时

image.png

ssh -T -p 443 git@ssh.github.com 换成443端口,依然连接超时
https://help.github.com/articles/using-ssh-over-the-https-port/

image.png

这里估计是公司代理上网,导致无法使用ssh https://stackoverflow.com/questions/15589682/ssh-connect-to-host-github-com-port-22-connection-timed-out

按照上面的说明将ssh换成https时git config --local -e报错,先不管了~

image.png

关键

直接配置~/.gitconfig文件
git config --global http.proxy http://userName:password@proxyaddress:port
git config --global https.proxy https://userName:password@proxyaddress:port
然后使用git clone https:这种模式

https://stackoverflow.com/questions/18356502/github-failed-to-connect-to-github-443-windows-failed-to-connect-to-github
https://stackoverflow.com/questions/496277/git-error-fatal-unable-to-connect-a-socket-invalid-argument

相关文章

网友评论

      本文标题:公司内网使用git clone报错ssh连接超时

      本文链接:https://www.haomeiwen.com/subject/hocujxtx.html