git ssh 问题

转载自http://www.cnblogs.com/qcwblog/p/5709720.html 

Warning: Permanently added the RSA host key for IP address '192.30.255.112' to the list of known hosts.

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

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

下面就直接说步骤:


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

git ssh 问题

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

2 直接上图

git ssh 问题

3. cat 一下  把出现的key 复制下来

git ssh 问题

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

git ssh 问题

git ssh 问题

git ssh 问题

git ssh 问题

一切都好了  就ok 了 ,反正我的就好了,如果你的还没好那肯定是姿势不对,换个姿势再来一次吧