Permissions error github (ssh key not recognized)

前端 未结 4 2078
-上瘾入骨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条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 05:58

    You have to export your key on the server with the command

    ssh-copy-id user@host
    

    and ssh-agent should run before your ssh-add. You can put this line in /etc/rc.local if you are under Linux :

    eval $(ssh-agent)
    

    Edit: now I know you use windows, so see this thread : Getting ssh-agent to work with git run from windows command shell

提交回复
热议问题