search

Home  >  Q&A  >  body text

git - What to do if you accidentally delete the local sshkey

I accidentally deleted the sshkey. I have regenerated the sshkey and added it to gitlab, but now the push code reports an error

Please give me some advice, how to solve it?

System OSX 10.11

高洛峰高洛峰2827 days ago607

reply all(2)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:35:02

    View the C:Usersusername.sshknown_hosts 文件 你会发现你之前的key gitlab.test.org,192.168.0.180 ssh-rsa key_string file content in the user’s home directory, which probably looks like this. You can try it

    reply
    0
  • 阿神

    阿神2017-05-02 09:35:02

    Is it the added public key? The public key is in ~/.ssh/id_rsa.pub. Are you sure there is no error in adding it?

    If that doesn’t work, why not try using SSH instead of using HTTPS?

    reply
    0
  • Cancelreply