Permission denied (PublicKey). Fatal:could not read from remote repository. Sure you have the correct access rights

Source: Internet
Author: User

The first time I submit a situation like this, what's going on, I submitted SSH key on GitHub.

Check first to see if you can parse,

1. Ping https://github.com First

Add IP to Host:sudo vi/etc/hosts (add the third line below)

127.0.0.1  localhost  localhost.localdomain  vm-0-6-ubuntu127.0.1.1       Tencent 192.30.255.113 github.com # Add IP# The following lines is desirable for IPV6 capable hosts:: 1< C9/>localhost ip6-localhost ip6-loopbackff02:: 1 ip6-allnodesff02::2 ip6-allrouters 192.30.255.113 github.com~                         

2. If not, see if you have entered the wrong vault address.

View Configuration

Cat. Git/config

[Core] repositoryformatversion=0 FileMode=true Bare=false Logallrefupdates=True[remote"Origin"] URL= [email Protected]:cuzz1/flask.git#of the wrongurl = [email protected]:cuzz1/Flask.git Fetch= +refs/heads/*:refs/remotes/origin/*[Branch"Master"] Remote=Origin Merge= Refs/heads/master

3. The present submission also appears

That is, the SSH key on GitHub is added incorrectly, we use ssh-keygen-t rsa-c "[email protected]" will be generated in many directories, such as ROOT/.SSH,/home/ubuntu/.ssh have Ras_ Id.pub

So we can't add the wrong. Must be in the ~/.ssh directory to be used, if the current directory, ~/.ssh/ras_id.pub to GitHub on the copy.

Now it's ready to submit.

Thanks to the help of brother, the Zen of the public number Python

Permission denied (PublicKey). Fatal:could not read from remote repository. Sure you have the correct access rights

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.