push代码时遇到的问题--github-ssh私钥修改
推送代码到github时遇到:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
xxxxxxxxxx
Please contact your system administrator.
Add correct host key in /c/Users/xxx/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/xxx/.ssh/known_hosts:7
RSA host key for [ssh.github.com]:443 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.
是因为GitHub更新了用于保护 GitHub.com 的 Git 操作的 RSA SSH 主机密钥,也就是使用ssh和远程连接的主机推送时都会遇到这个问题,
- 详见 https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
- 而在执行以下命令时遇到了写入失败的问题。
$ curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >> ~/.ssh/known_hosts
解决方法之一:将~/.ssh/known_hosts
文件里的ssh.github.com
这一行删掉 - 其他问题详见: https://stackoverflow.com/questions/75830783/warning-remote-host-identification-has-changed-did-github-change-their-rsa
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
2021-03-29 第八周助教总结(2021.3.22-2021.3.28)