记录一个使用git过程中的小错误,谨供遇到类似错误的小伙伴参考。
问题:
今天push代码,莫名报错:
1 RSA host key for git.timacloud.cn 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.
fatal: Could not read from remote repository.
分析:
很明显的ssh keys密钥问题,机密钥验证失败。无法从远程存储库读取。也可能是权限问题,但是有代码权限的,所以尝试重置ssh keys。
解决:
1.删除本地密钥配置
文件位于:C:\Users\你的用户\.ssh
2.生成ssh keys
命令
ssh-keygen -t rsa -C "xxx@xxx" (你的git账号)
一路回车,如下所示

3.git设置添加密钥(博主

当在使用Git时遇到RSA host key更改的错误,本文提供了解决方案。问题表现为Host key verification failed,无法从远程仓库读取。解决步骤包括删除本地SSH密钥、生成新的SSH keys、在Git平台添加密钥以及确认主机的真实性。
最低0.47元/天 解锁文章
4万+

被折叠的 条评论
为什么被折叠?



