Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts.

今天从远程库github.com克隆代码时遇到了如下的问题:

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts.

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第1张图片

 

这个应该是很多github新手经常出错的问题,这个就是没有在你github上添加一个公钥。

下面就直接说下步骤:

1 可以用 ssh -T [email protected]去测试一下

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第2张图片

图上可以明显看出缺少了公钥

2.可以用: ssh-keygen -t rsa -C "GitHub账号" ,一直Enter下去生成公钥如下所示: 

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第3张图片

3.然后用:cat+公钥路径,把出现的key复制下来:

 4 .在github上添加刚刚生成的公钥

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第4张图片

5.选择SSH and GPG keys:

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第5张图片

6. 选择new SSH key:

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第6张图片

7.添加生成的key:

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第7张图片

8.我们再从远程仓库克隆就可以成功了:

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第8张图片

 9.我们就可以看到克隆下来的文件了:

Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts._第9张图片

这样就ok 了 ,反正我的就好了,如果你的还没好那肯定是姿势不对,换个姿势再来一次吧,对你有帮助的话点个赞吧

不过在复制,粘贴的过程中也遇到了一些小问题,可以参考:https://blog.csdn.net/yushuangping/article/details/84261190

你可能感兴趣的:(Git,git)