问题
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