Git pull error fatal:could not read from remote repository. Please make sure the correct access rights.and the repository exists.

Source: Internet
Author: User

Warning:permanently added the RSA host key for IP address ' 192.30.252.131 ' to the 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.

This problem occurs because no SSH key is added to the GitHub account


Here's how to fix it

in terminal input.

Ssh-keygen-t rsa-c "forwhat.cn"//note. forwhat.cn for User name

If the execution succeeds. Return

Generating public/private RSA key pair.
Enter file in which to save the key (/HOME/FORWHAT.CN/.SSH/ID_RSA):
This is where you set up your storage address. Anyway, I was just pressing the carriage return.

It will then return

Enter passphrase (empty for no passphrase):

Enter again directly.
Enter same Passphrase again:

Enter again.

Your identification has been saved In/home/forwhat.cn/.ssh/id_rsa.
Your Public Key has been saved in/home/forwhat.cn/.ssh/id_rsa.pub.
The key fingerprint is:
There's a bunch of numbers here. I've blocked him.
The key ' s Randomart image is:
+--[RSA 2048]----+
|                  |
|                 |
|                 |
|    o            |
|   + .  s        |
| . = .  o       |
|   O + +o.o      |
| E O. o.=+.      |
|. +   ==+ooo.     |
+-----------------+
So ssh key is generated. Just cat a little bit better.

000000:~/a$ cat/home/forwhat.cn/.ssh/id_rsa.pub
Ssh-rsa Aaaab3nzac1yc2eaaaadaq (I blocked it)

Add the displayed directly to the SSH keys in the GitHub account settings
。 Add.

Back in Git pull

It's starting to copy the code remotely.

Reprint Address: www.forwhat.cn

Git pull error fatal:could not read from remote repository. Please make sure the correct access rights.and the repository exists.

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.