SSH cannot authenticate to git@github.com

后端 未结 5 1768
陌清茗
陌清茗 2021-01-30 09:28

Recently, I sign up for a free plan on Github.com. I follow their instructions to generate a ssh key to add to my account. However, when I try ssh -v git@github.com

相关标签:
5条回答
  • 2021-01-30 09:33

    You can use ssh-add ~/.ssh/id_rsa to fix this.

    0 讨论(0)
  • 2021-01-30 09:42

    Check the file permissions on your key. If they are too liberal it may be refusing to use the key. Make sure they only have perssion for you (0700).

    0 讨论(0)
  • 2021-01-30 09:44

    After trying all these answers with no luck, the following command solved it for me:

    unset SSH_AUTH_SOCK

    0 讨论(0)
  • 2021-01-30 09:45

    If you're using Github enterprise (Self hosting) it would be worth checking to see if the site is reachable. Applies to Github also.

    Ran into the same issue in Intellij and when I went to check if the RSA public key was saved in my profile I found out the site returned a server error.

    0 讨论(0)
  • 2021-01-30 09:48

    If it doesn't already exist, you generate the ssh key first:

    ssh-keygen -t rsa 
    

    now copy this key, it'll be in this dir ~/.ssh/id_rsa.pub, open with notepad, paste this key in the "add ssh key" section in your github account! That's it!

    0 讨论(0)
提交回复
热议问题