2

I have tried to pull my official repository to my local machine using

git pull git@github.com:x/x_project_management_app.git master

but it failed with error

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

I have regenerated and added my system ssh-public key to my github account,I tried with different system also,but I'm still facing same error. How can I fix it?

NIKHIL K A
  • 328
  • 5
  • 16

3 Answers3

0

You need to check if your public/private key is:

  • set with the default names id_rsa, id_rsa.pub (instead of id_rsa_github for instance)
  • set in ~/.ssh (or %HOME%\.ssh on Windows, with HOME defined by git-cmd.bat)
  • set with the right permissions.

See more at the GitHub page "Error: Permission denied (publickey)".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Using git bash instead of Windows command line worked for me

nwagu
  • 532
  • 3
  • 17
0

Try to give the git correct permissions

sudo chmod 777 .git/FETCH_HEAD 
Mahdi Younesi
  • 6,889
  • 2
  • 20
  • 51