Ssh, permission denied (publickey) on GitHub)

Source: Internet
Author: User

Http://www.douban.com/note/201614252/

Ssh, permission denied (publickey) on GitHub) 2012-02-20 19:30:00 In short, this problem often occurs in Linux.

The following is a command my sister tried. You can use it one by one. This is a great deal ~~~

First, let's see if you can use it:
Ssh-T git@github.com

If you can:
Hi your_name... success... but no shell access (forgot)

Otherwise, you may not have RSA key pair. Generate first. Remember to generate to the root directory :~ /. SSH

Ssh-keygen

Then, if you ask about anything, enter will be default to root.

Then, load the id_rsa.pub file to your GitHub account: account settings ---> SSH ---> Add new SSH key.

Remember Copy & Paste. Do not change anything!

Now it should be okay, but sometimes .....

If the problem persists, try:
$ Chmod 700 ~ /. SSH
$ Chmod 600 ~ /. Ssh /*

If the problem persists, create a config file in the SSH directory. If so, add the lines directly:

Host github.com
User git
Hostname github.com
Preferredauthentications publickey
Identityfile [local path to private key half of GitHub Public Key you provided]

I encountered a strange syntx error, and I didn't use the last line. It's okay to use clone command. I don't know what this identityfilei is... all in all. I'm bored!

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.