can't pull changes from github - Permission denied (publickey). fatal: Could not read from remote repository

catch23

I tried to pull project from github to my local repository.

I generated all necessary ssh keys. And I cloned this project. but when I tried to pull changes I caught:

$ git pull
The authenticity of host 'github.com (192.30.252.129)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of know
n hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

here is content of .ssh:

Directory of C:\Users\nlel.ssh

15.01.2014  13:35    <DIR>          .
15.01.2014  13:35    <DIR>          ..
09.01.2014  15:24             1 675 github_rsa
09.01.2014  15:24               391 github_rsa.pub
09.01.2014  13:08             1 751 id_rsa
09.01.2014  13:08               405 id_rsa.pub
15.01.2014  13:36               803 known_hosts
               5 File(s)          5 025 bytes
               2 Dir(s)  59 142 991 872 bytes free

They are presented at github account. And I cloned project ok.

Solution:

I recreated my keys. And generated them again, using key phrase.
I deleted old keys from pc and github and added new.

And all works now. Tricky point is that this repo was private.

- Why does this happen?
- How to solve this trouble?

VonC

ssh would only seek %HOME%\.ssh\id_rsa(.pub)

If you want ssh to pick a different set of keys, you need to declare those in a %HOME\.ssh\config file (which I don't see in your dir).

That config file would include something like:

Host github
  HostName github.com
  User git
  IdentityFile C:\path\to\.ssh\github_rsa
  IdentitiesOnly yes

Rename the url of your 'origin' remote with a:

cd /path/to/my/repo
git remote set-url origin github:yourName/YourRepo.git

This is needed for pushing (writing to) a GitHub repo that you own.
You wouldn't need ssh keys at all for pulling (reading) from a public repo.


In the OP nazar-art's case, the keys weren't probably the right ones, and recreating those was enough:

I recreated my keys. And generated them again, using key phrase.
I deleted old keys from pc and github and added new.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

GitHub: Permission denied (publickey). fatal: Could not read from remote repository

From Dev

Permission denied (publickey). fatal: Could not read from remote repository

From Dev

Git: Permission denied (publickey). fatal: Could not read from remote repository

From Dev

Error $ git pull --rebase Permission denied (publickey). fatal: Could not read from remote repository

From Dev

Clone the repository from Codebase Permission denied (publickey). fatal: Could not read from remote repository

From Dev

Clone the repository from Codebase Permission denied (publickey). fatal: Could not read from remote repository

From Java

Git: Permission denied (publickey) fatal - Could not read from remote repository. while cloning Git repository

From Java

Heroku 'Permission denied (publickey) fatal: Could not read from remote repository' woes

From Dev

Git Clone : Permission denied (publickey). fatal: Could not read from remote repository

From Dev

gitlab: Windows: How to use chmod and fix "Get Permission denied (publickey). fatal: Could not read from remote repository"

From Dev

Git Clone : Permission denied (publickey). fatal: Could not read from remote repository

From Dev

Can't push my code to Heroku: Permission denied <public key> fatal: Could not read from remote repository

From Java

git: fatal: Could not read from remote repository

From Java

Can't git push to Bitbucket: Unauthorized - fatal: Could not read from remote repository

From Dev

git Connection abandoned, fatal: Could not read from remote repository

From Dev

A strange "fatal: Could not read from remote repository." with crontab

From Dev

A strange "fatal: Could not read from remote repository." with crontab

From Dev

CentOS: Git: "fatal: could not read from the remote repository"

From Dev

GitHub Error - "ssh: connect to host github.com port 22: Operation timed out fatal: Could not read from remote repository."

From Dev

Permission denied (publickey). fatal: The remote end hung up unexpectedly for git pull

From Java

Git push: "fatal 'origin' does not appear to be a git repository - fatal Could not read from remote repository."

From Dev

git pull changes automatically from a remote repository

From Dev

conq: repository does not exist. fatal: Could not read from remote repository

From Dev

fatal: Could not read from remote repository. When I push my local repo to remote server

From Dev

How to pull changes from the remote repository without pushing the local changes with Github Desktop

From Java

GitHub - Pull changes from a template repository

From Dev

Can't scp file from local to remote host - Permission denied

From Dev

Permission Denied (publickey)/fatal: The remote end hung up unexpectedly?

From Dev

git clone: "remote: The namespace you were looking for could not be found." ... "fatal: Could not read from remote repository."

Related Related

  1. 1

    GitHub: Permission denied (publickey). fatal: Could not read from remote repository

  2. 2

    Permission denied (publickey). fatal: Could not read from remote repository

  3. 3

    Git: Permission denied (publickey). fatal: Could not read from remote repository

  4. 4

    Error $ git pull --rebase Permission denied (publickey). fatal: Could not read from remote repository

  5. 5

    Clone the repository from Codebase Permission denied (publickey). fatal: Could not read from remote repository

  6. 6

    Clone the repository from Codebase Permission denied (publickey). fatal: Could not read from remote repository

  7. 7

    Git: Permission denied (publickey) fatal - Could not read from remote repository. while cloning Git repository

  8. 8

    Heroku 'Permission denied (publickey) fatal: Could not read from remote repository' woes

  9. 9

    Git Clone : Permission denied (publickey). fatal: Could not read from remote repository

  10. 10

    gitlab: Windows: How to use chmod and fix "Get Permission denied (publickey). fatal: Could not read from remote repository"

  11. 11

    Git Clone : Permission denied (publickey). fatal: Could not read from remote repository

  12. 12

    Can't push my code to Heroku: Permission denied <public key> fatal: Could not read from remote repository

  13. 13

    git: fatal: Could not read from remote repository

  14. 14

    Can't git push to Bitbucket: Unauthorized - fatal: Could not read from remote repository

  15. 15

    git Connection abandoned, fatal: Could not read from remote repository

  16. 16

    A strange "fatal: Could not read from remote repository." with crontab

  17. 17

    A strange "fatal: Could not read from remote repository." with crontab

  18. 18

    CentOS: Git: "fatal: could not read from the remote repository"

  19. 19

    GitHub Error - "ssh: connect to host github.com port 22: Operation timed out fatal: Could not read from remote repository."

  20. 20

    Permission denied (publickey). fatal: The remote end hung up unexpectedly for git pull

  21. 21

    Git push: "fatal 'origin' does not appear to be a git repository - fatal Could not read from remote repository."

  22. 22

    git pull changes automatically from a remote repository

  23. 23

    conq: repository does not exist. fatal: Could not read from remote repository

  24. 24

    fatal: Could not read from remote repository. When I push my local repo to remote server

  25. 25

    How to pull changes from the remote repository without pushing the local changes with Github Desktop

  26. 26

    GitHub - Pull changes from a template repository

  27. 27

    Can't scp file from local to remote host - Permission denied

  28. 28

    Permission Denied (publickey)/fatal: The remote end hung up unexpectedly?

  29. 29

    git clone: "remote: The namespace you were looking for could not be found." ... "fatal: Could not read from remote repository."

HotTag

Archive