GitHub Error Message - Permission denied (publickey)

后端 未结 30 2168
长发绾君心
长发绾君心 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:22

    Did you create a config file in your ~/.ssh directory? It should have contents like these:

    Host github.com 
     IdentityFile ~/.ssh/github_rsa
    

    Assuming that you created an ssh key named github_rsa

    and uploaded it to GitHub...

    NOTE: You must follow this way of explicit configuration if you have more than 1 key (2 and more) in your ~/.ssh/ directory. If you don't specify key this way, then first key in order is taken and used for github authentication, so it depends on the key file name then.

提交回复
热议问题