First, clear all key-pairs
ssh-add -D
rm -r ~/.ssh
delete your public-key in github
Regenerate ssh key pair
ssh-keygen -t rsa -C "[email protected]"
chmod 0700 ~/.ssh
chmod 0600 ~/.ssh/id_rsa*
Next, operate normally
Add the public key public-key on github:
1. First run xclip -sel c ~/.ssh/id_rsa.pub in your terminal to copy the public key content to the clipboard
2. Add the public key on github 3.
Save
Test:
ssh -T [email protected] in the terminal
Author: Duan Haining
Link: https://www.zhihu.com/question/21402411/answer/42836492
Source: Zhihu
The copyright belongs to the author. For commercial reprints, please contact the author for authorization, and for non-commercial reprints, please indicate the source.