解决 `Failed to connect to github.com port 443: Connection refused`

解决 Failed to connect to github.com port 443: Connection refused

问题

git clone 时报错:

Failed to connect to github.com port 443: Connection refused

按照网上教程修改代理无效。

解决

  • GitHub添加SSH key

  • 还是不行,报错

    connect to host github.com port 22: Connection timed out
    
  • 修改22端口为443, 解决问题

    • 打开.ssh/config,添加如下内容

      Host github.com
          Hostname ssh.github.com
          Port 443
      

你可能感兴趣的:(github,git)