Git push is reported permission denied (PublicKey) error resolution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.