问题1】:每天git push代码都好好的,今天也不知道为啥,傲娇起来了,报了这样一个错误:No supported authentication methods available(server sent:pubickey),然后就来问度娘了,一位网友提供了如下解决方法
将Tortoise默认的SSH客户端修改为Git服务的SSH客户端,即D:\software\TortoiseGit\bin\TortoiseGitPlink.exe修改为D:\software\Git\usr\bin\ssh.exe
在这里插入图片描述

恩,“没有认证方法”的问题解决了,又来问题了:fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists,但是我明明在github里配置了ssh key啊,于是另一个网友又提供了解决方法:把.ssh目录下的known_hosts文件删除。
最终,可以push代码了。

问题2】:IDEA中使用git push代码时遇到如下报错:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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/admin/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/admin/.ssh/known_hosts:1
RSA host key for [git.imooc.com]:80 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.

删除C:\Users\admin\.ssh目录下的known_hosts即可。

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐