1

the command

git clone git@github.com*********

will failed with the info :

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

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

I have searched it on internet many times. the answer usually is about that the public key is wrong or so on. however when i try the command

ssh -T git@github.com

it work..

and my id_rsa.pub is just added on github,and when i use the command above i can see the tags under my ssh key Last used within the last day

So i can't understand what is the wrong with my git.feel so bad T^T.My morning is just work on this problem and look for the solution.

My system is macOS

Thanks for your answer.

rui
  • 1,003
  • 1
  • 7
  • 5
  • 2
    Have you seen [this SO post](http://stackoverflow.com/questions/2643502/git-permission-denied-publickey)? There are 22 answers, and they all look helpful. – Tim Biegeleisen May 13 '16 at 06:17
  • Is that a private repository? Are you able to login to another server using your public key? (Do you understand well how to setup public key authentication in general?) – janos May 13 '16 at 13:11

1 Answers1

0

this problem confused me a lot,even i have tried all the solution that i could find on internet,until the day i reinstall my computer by accident. It works. I guess some conf in my old system is wrong with the git.

rui
  • 1,003
  • 1
  • 7
  • 5