问题描述
git push时遇到问题:
ssh: connect to host github.com port 22: Connection timed out
现象
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ ssh -T -p 443 git@ssh.github.com
Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.
解决方案
$ vim ~/.ssh/config
# 添加如下
Host github.com
Hostname ssh.github.com
Port 443
本文描述了在使用Gitpush时遇到SSH连接GitHub(github.com)失败的问题,分析了原因(端口22超时),提供了通过修改~/.ssh/config文件将连接端口改为443并指向ssh.github.com的解决方案。
1万+

被折叠的 条评论
为什么被折叠?



