ssh -T git@github.com
测试ssh,报连接超时
ssh -T -p 443 git@ssh.github.com
换成443端口,依然连接超时
https://help.github.com/articles/using-ssh-over-the-https-port/
这里估计是公司代理上网,导致无法使用ssh https://stackoverflow.com/questions/15589682/ssh-connect-to-host-github-com-port-22-connection-timed-out
按照上面的说明将ssh换成https时git config --local -e
报错,先不管了~
关键
直接配置~/.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