Permission denied (PublicKey) is unable to git clone locally after github backend configuration ssh key.

Source: Internet
Author: User
Tags ssh git clone



When you add SSH keys in the background of GitHub, if you have some problems with local git clone git://www.somesite.com/test.git, instead of access denied, you need to test this locally:


Ssh-t git@github.com


If the return is:


Permission denied (PublicKey).


Then you might want to ssh-add it locally, but before you do, you can use SSH-VT git@github.com to see what caused the failure.


Ssh-add ~/.ssh/youraccount_rsa


It will then return as follows:


Enter Passphrase For/users/andy/.ssh/youraccount_rsa:
Identity added:/users/andy/.ssh/youraccount_rsa (/USERS/ANDY/.SSH/YOURACCOUNT_RSA)


Then use Ssh-t git@github.com


will return to success:


Hi youraccount! You've successfully authenticated, but GitHub does not provide shell access.


Indicates that your current local SSH has switched to the Youraccount account,


Then you can make Git clone to Local:


git clone git@github.com:youraccount/yourproject.git





Another: If you have the app for the kitten that uses GitHub, then when you git-t git@github.com you will be logged in using the GitHub account you set up in the GitHub program, not SSH's RSA account.




2014.12.12, it was found that the public key information in the Known_hosts file caused the

Delete the original public key information in the/root/.ssh/known_hosts file.

But it hasn't been verified yet.



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.