问题
git pull
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
解决方法
在C:\Users\username.ssh文件夹下新建config文件,填入以下文本(如有则直接在文件最后一行新增):
Host github.com
Hostname ssh.github.com
Port 443
将22端口修改为443即可。
验证:
ssh -T git@github.com
出现Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.即正常。
参考资料
https://zhuanlan.zhihu.com/p/521340971
博客主要围绕Git SSH连接GitHub的问题展开,给出了解决方法,即在C:\\Users\\username.ssh文件夹下新建或修改config文件,将22端口修改为443,并进行验证。还提供了参考资料链接。
1万+

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



