尝试连接到 git 上的远程存储库时出现“ssh_exchange_identification: read: Connection reset by peer”错误

for*_*e13 11 git github

我对 github 很陌生,大约两周前我开始使用它。一切正常,我能够从我的远程存储库中推送和拉取。然而,今天,当我试图从中拉出时,我收到了以下错误消息:

ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

当我尝试执行任何连接到我的远程 github 存储库(推送、拉取、获取等)的操作时,实际上,它给了我同样的错误。

当我输入这个命令时:“ssh -T git@github.com”,我得到:

ssh_exchange_identification: read: Connection reset by peer
Run Code Online (Sandbox Code Playgroud)

我没有修改我的存储库或我的 SSH 密钥或任何东西中的任何设置,所以我不知道它为什么突然停止工作。可能是什么问题呢?

dha*_*ant 18

我也遇到了这个问题,我可以通过重新启动互联网连接来解决它。

当 git bash 突然给我这条消息时,我很困惑。我根本没有对我的 git 存储库进行任何更改。重新启动我的连接修复了它。


小智 10

git-init。它将重新初始化连接


Kan*_*ndy 6

我最近遇到了类似的问题,我不确定它是否与通过以下命令获得连接的用户完全相同。

ssh -T git@gitlab.com

但是当我尝试将代码推送到远程存储库时,我遇到了同样的错误。

kex_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

在从互联网上尝试了一些解决方案但没有成功之后,我只是尝试了 git init 并且它对我有用。我希望这仅在连接用户正确绑定时才有效。

试试看 祝你好运.. :)