connect to host github.com port 22: Connection timed out

错误信息:

  • $ git pull project develop
  • ssh: connect to host github.com port 22: Connection timed out
  • fatal: Could not read from remote repository.

解决步骤:

  1. 测试可用性:

  2. 编辑 ~/.ssh/config 文件:

    • 如果没有该文件,使用命令:vim ~/.ssh/config
    • 添加以下内容:
      Host github.com
      Hostname ssh.github.com
      Port 443
      
  3. 再次测试:

    • 运行命令:ssh -T [email protected]
    • 如果提示成功,说明问题已解决。
      Summarized by https://chrome.google.com/webstore/detail/cbgecfllfhmmnknmamkejadjmnmpfjmp

你可能感兴趣的:(github)