nginx ssh-key connection exception
Not long ago, I wanted to restart the company’s gitlab server.I couldn’t coonect to ssh when it restarted.emm……I try copy the ssh rsa.pub,but it didn’t work.
error log:
identity_sign: private key ~/.ssh/id_rsa contents do not match public
what is happen?
solution
reconfigure gitlab ssh key!
- create new ssh key
1ssh-keygen -t rsa -C 'git@gitlab.com' -f ~/.ssh/gitlab-rsa
- update config file,enter ~./ssh,open config
1# add host
2Host gitlab.com
3 HostName gitlab.com
4 IdentityFile ~/.ssh/gitlab_id-rsa
- enter http://gitlab.com ,Profile Settings–>SSH Keys–>Add SSH Key
You are done