Github: Permission denied (publickey)

前端 未结 3 1612
臣服心动
臣服心动 2020-12-16 16:55

Update

Ran into this again today - when my work laptop was taken home - appears that a Window domain might be the underlying issue. Found the soluti

相关标签:
3条回答
  • 2020-12-16 17:36

    Seems like you have a bunch of private keys:

    debug1: Trying private key: /p/.ssh/identity
    debug1: Trying private key: /p/.ssh/id_rsa
    debug1: Trying private key: /p/.ssh/id_dsa
    

    Do you recognize any of these?

    You might try to specify the key to be used with -i:

    ssh -i /path/to/key -vT git@github.com
    

    Maybe this will help.

    0 讨论(0)
  • 2020-12-16 17:42

    I ran into this same issue today. My private key wasn't owned by the account I was logged in with.

    For anyone else make sure that your account is the owner of the key. In my case it wasn't as it was copied from another account.

    Running ssh -i /path/to/key -vT git@github.com as noted by @lum showed me that I didn't have permission to access my private key. Changing owner on the key fixed my issue.

    debug1: could not open key file '/home/matt/.ssh/id_rsa': Permission denied

    Hope this helps future people.

    0 讨论(0)
  • 2020-12-16 17:53

    copy .ssh folder of C:\Users{Administrator}.ssh to git's working directory

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