最近 github 总是出现 kex_exchange_identification 的报错 ?

3 min read

ssh -vT [email protected]

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

这个问题一般是由于 SSH 密钥不正确或者被禁用引起的。你可以尝试以下方法进行解决:

  1. 确认你的 SSH 密钥是否正确配置。你可以按照 GitHub 的文档重新生成一组密钥,并在 GitHub 上添加对应的公钥。

  2. 如果你已经确认了密钥配置正确,可以尝试删除 ~/.ssh/known_hosts 这个文件,然后再次尝试连接。

  3. 也有可能是你所连接的网络环境问题,可以尝试更换网络重试连接。

如果以上方法都不行的话,可以尝试联系 GitHub 官方支持。