git:Could not read from remote r

2017-10-21  本文已影响25人  死宅程序员

issue

ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

环境

结论

经过调查发现,在C:\Users\xxx\.ssh\config中的配置出现了问题,HostName 应配置为 ssh.github.com,不要漏掉 ssh.
以下是完整配置(IdentityFile 需自行指定)

Host github.com
    User git
    HostName ssh.github.com
    Port 443
    IdentityFile /C/Users/xxx/.ssh/id_rsa
上一篇 下一篇

猜你喜欢

热点阅读