Today dizzy for a long time, got a git project to GitHub, thought is very simple, because before also got, that know to make the most of the day are not good, has been reported the following error
D:\javawork\ee-0.0.1-snapshot>git Push-u Origin Master
Warning:permanently added the RSA host key for IP address ' 192.30.252.130 ' to t
He list of known hosts.
Permission denied (PublicKey).
Fatal:could not read from remote repository.
Sure you have the correct access rights
and the repository exists.
View the official website description
https://help.github.com/articles/generating-ssh-keys/
The main steps are as follows
1 ssh-keygen-t rsa-b 4096-c "[Email protected]"
2 ssh-agent-s
3 Ssh-add ~/.ssh/id_rsa
4 and add the public key to the GitHub website.
But on the 3rd step, Ssh-add ~/.ssh/id_rsa this has been unsuccessful
Reported permission denied (PublicKey).
Find a lot of information, have said to ssh-agent bash,
Have said Ssh-agent
Ssh-add ~/.ssh/Id_key
No, I finally saw a piece of paper
http://blog.csdn.net/wswqiang/article/details/7200022
Probably mean to use the Windows git version , try it out, and do it without executing ssh-add on Windows git, git push succeeds
Since then, the problem has been resolved.
Git push is reported permission denied (PublicKey) error resolution