git提交失败

来源:2-4 代码关联Git远程仓库

哇哦哇哦嘿哈

2021-03-13

前几天还可以提交,今天就显示这个了

Push failed @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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 SHA256:xnm0q+BqBcS4V4hbst3zE9U7AabUGi5RquzA5kP/bfk. Please contact your system administrator. Add correct host key in /c/Users/liu/.ssh/known_hosts to get rid of this message. Offending RSA key in /c/Users/liu/.ssh/known_hosts:2 RSA host key for [git.imooc.com]:80 has changed and you have requested strict checking. Host key verification failed. Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

写回答

3回答

椒盐青芒

2021-07-15

你看你的错误信息里面这句话【Offending RSA key in /c/Users/liu/.ssh/known_hosts:2 RSA host key for [git.imooc.com]:80 has changed and you have requested strict checking】这里面说了这个文件的路径,你找到C:\Users\liu\.ssh文件夹下的known_hosts,删除,在重新执行  git push -u origin master  语句即可。当然,你看慕村翔m老哥的答案也行。提供另一个方法而已,虽然从根本上来说都是同一个方法。

2
0

慕村翔m

2021-03-16

(window)git bash中执行   

rm -rf ~/.ssh/known_hosts

在push

1
1
慕移动7148688
遇到同样的问题,就你这个答案靠谱,谢谢!
2021-04-09
共1条回复

达布牛和小耗子的春天

2021-03-14

把know_hosts文件内的,相关git信息删掉,保存,,然后push就行了

1
1
达布牛和小耗子的春天
在.ssh文件夹内,我是mac所以是用户根目录,你的话自己找一下这个文件夹
2021-03-14
共1条回复

Spring Boot+Vue3前后端分离,实战wiki知识库系统

一课掌握前后端最火框架,更有职场竞争力

2524 学习 · 1671 问题

查看课程