转载请标明出处:http://blog.csdn.net/donkor_/article/details/77502800
前言:
Warning: Permanently added the RSA host key for IP address '192.29.255.115' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists
今天在上传项目到github时候,出现了上述描述的错误。这个应该是很多github新手经常出错的问题,其实就是没有在你github上添加一个公钥。
▲ 解决方案(图文教程)
1 . 使用 ssh -T git@github.com
测试一下,得到Permission denied(publickey).
意思表示缺少公钥。
ssh -T git@github.com
2 . 输入ssh-keygen -t rsa -C "ChenYXin"
,之后猛击下一步(Enter),当看到RSA 2048
的框框时,表示成功生成公钥。ChenYXin
是我本人的github账号。记住保存公钥的地址,第三步要用。
ssh-keygen -t rsa -C "ChenYXin"
3 . cat 一下第二步保存的公钥地址,在控制台将公钥复制下来。
cat in /User/~~/.ssh/id_rsa.pub
4 . 登录github账号,添加刚刚复制的公钥
step one
step two
step three
step four
这里的title并不重要,可不填
▲ 如果还没解决,要不您换个姿势再试试(google)