简体   繁体   中英

how to change local git ssh-key?

I was made a big mistake:override the local ssh-key.

Now, i generated a new ssh-key, and added it to the gitlab. But i'm still can't push code to the remote.

this is the error message

Please tell me how to switch the local ssh-key, thanks!

My operating system is OSX 10.11

For ubuntu user, Please try this on terminal

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Add generated ssh key into /Users/you/.ssh/id_rsa file

For more detail follow steps from below link

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM