GitHub Error Message - Permission denied (publickey)

后端 未结 30 2234
长发绾君心
长发绾君心 2020-11-22 04:23

Anybody seen this error and know what to do?

I\'m using the terminal, I\'m in the root, the GitHub repository exists and I don\'t know what to do now.



        
30条回答
  •  误落风尘
    2020-11-22 05:11

    OK there are few solutions to this one, some of them might already been mentioned but just to keep them together:

    • make sure you keys are present, by default another ~/.ssh/ folder, i.e. id.rsa and id.rsa.pub

    • make sure the keys have correct permissions, you can run chmod:

      chmod 600 ~/.ssh/id_rsa

      chmod 644 ~/.ssh/id_rsa.pub

    • make sure the content of you public key (id_rsa.pub) matches the one uploaded in the remote repository configuration

    • Finally fix the problems with ssh agent: ssh-add

    Some more info: https://itcodehub.blogspot.com/2015/01/ssh-add-problems-with-ssh-agent-and.html

提交回复
热议问题