Warning: Permanently added ‘github.com,13.229.188.59‘ (RSA) to the list of known hosts. [email protected]

用idea 从github上下载spring 源码时

Warning: Permanently added ‘github.com,13.229.188.59’ (RSA) to the list of known hosts. [email protected]: Permission denied (publickey). Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

解决方法:

1.桌面 打开git bash
在这里插入图片描述

2.输入cd C:

3.cat ~/.ssh/id_rsa.pub

4.应该会出现上图所示一大段字符串:ssh-rsa…,这就是所谓的publickey;但是如果提示报错的话则说明没有公钥,此时你应当自己创建一个公钥,输入

ssh-keygen

然后一直回车就行,最后会生成一个矩形框框一样的东西,就说明公钥已经生成了,重复步骤3,那一大段就是publickey,右键copy复制。

5.打开浏览器登录你的github,点击右上角带黄色的头像–>settings–>(personal settings中的)SSH and GPG keys–>new SSH key–>title自己取名,key中粘贴publickey–>Add SSH key–>成功!

6.再次连接就可以啦。

猜你喜欢

转载自blog.csdn.net/qq_26634873/article/details/112277971
今日推荐