无法连接 git 远程仓库,自动同步失败

使用问题 · 241 次浏览
sorasunn 创建于 2023-03-25 03:12

之前一直能成功备份,两天前没法用了。

下面是异常信息,我自己尝试按照文档去Git上重填了一遍我的SSH,好像不起作用。

请问接下来我应该怎么做?感谢开发和分享。

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is (略). Please contact your system administrator. Add correct host key in /c/Users/a/.ssh/known_hosts to get rid of this message. Offending RSA key in /c/Users/a/.ssh/known_hosts:1 RSA host key for github.com has changed and you have requested strict checking. Host key verification failed. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.


回复内容
风未知 2023-03-25 10:24
#1

我没有遇到过这个问题,但我通过搜索

Add correct host key in /c/Users/a/.ssh/known_hosts to get rid of this message

找到了一些解决方法,其中这个看起来最简单直接:

https://cloud.tencent.com/developer/article/2111809

善用搜索引擎

sorasunn 回复 风未知 2023-03-25 11:52 :

感谢回答!先按照答主给出的链接的说明删除文件之后,又按照http://events.jianshu.io/p/8c8be34a9c26的问题2的步骤处理了一下,备份成功了。希望对后续的用户有帮助。

我也是自己先做过一些搜索和尝试以后才来提问的。毕竟前置知识和经验不足,那段warning对我来说噪声很大,识别不出哪个才是有效的检索字段。按链接删除了文件之后,warning就变得很短了:Host key verification failed. fatal: Could not read from remote repository.

与其说是使用搜索引擎的差距,不如说是前置知识储备和实力的差距。感谢开发和分享!

回复主贴