错误信息:
- $ git pull project develop
- ssh: connect to host github.com port 22: Connection timed out
- fatal: Could not read from remote repository.
解决步骤:
-
测试可用性:
- 运行命令:ssh -T -p 443 git@ssh.github.com
- 如果提示可用,说明成功。
-
编辑 ~/.ssh/config 文件:
- 如果没有该文件,使用命令:vim ~/.ssh/config
- 添加以下内容:
Host github.com Hostname ssh.github.com Port 443
-
再次测试:
- 运行命令:ssh -T git@github.com
- 如果提示成功,说明问题已解决。
Summarized by https://chrome.google.com/webstore/detail/cbgecfllfhmmnknmamkejadjmnmpfjmp