当前位置: 代码迷 >> 综合 >> Git 报错 Permanently added the RSA host key for IP address
  详细解决方案

Git 报错 Permanently added the RSA host key for IP address

热度:1   发布时间:2024-02-23 18:10:47.0

正常使用过程中出现了以下问题

Warning: Permanently added the RSA host key for IP address
‘13.250.177.223’ to the list of known hosts. git@github.com:
Permission denied (publickey). fatal: Could not read from remote
repository.

搜索了一下发现是电脑添加的GitHub公钥丢失

解决方案:

  • ssh-keygen -t rsa -C “GitHub账号”
    输入自己的GitHub账号

    然后会在user下面生成一个ssh key 我的以前生成过,GitHub上面不见了

  • 在GitHub SSH and GPG 页面上添加ssh公钥

在这里插入图片描述
在这里插入图片描述

验证一下链接

ssh -T git@github.com

在这里插入图片描述

参考链接

1.GitHub add ssh

  相关解决方案