Permissions error github (ssh key not recognized)

前端 未结 4 2083
-上瘾入骨i
-上瘾入骨i 2021-01-31 05:04

I seem to have lost my permissions to a github account after pushing to it from another (local) repository. I am now receiving the following error:

git push 
Pe         


        
4条回答
  •  闹比i
    闹比i (楼主)
    2021-01-31 05:48

    If you already have a public key in ~/.ssh (and have already added that key to your github account), you might only have to load your key into the SSH agent again.

    To test if the SSH agent has the key, type ssh-add -l If the result is:

    The agent has no identities.
    

    Then simply load your key into the SSH agent like this:

    ssh-add ~/.ssh/github_rsa
    

    (github_rsa is the name on my machine for the stored SSH key. This file can, among others, also be named: id_rsa)

    After that you have to enter your passphrase for the key (this is likely your password to log into github). If you get a message like this:

    Identity added: /Users/name/.ssh/github_rsa (/Users/cpotzinger/.ssh/github_rsa)
    

提交回复
热议问题