Github: Permission denied (publickey)

前端 未结 3 1638
臣服心动
臣服心动 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: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.

提交回复
热议问题