目录

nginx ssh-key connection exception

目录

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:

1
identity_sign: private key ~/.ssh/id_rsa contents do not match public

what is happen?

solution

reconfigure gitlab ssh key!

  1. create new ssh key
1
ssh-keygen -t rsa -C '[email protected]' -f ~/.ssh/gitlab-rsa
  1. update config file,enter ~./ssh,open config
1
2
3
4
5
# add host
Host gitlab.com
    HostName gitlab.com
    IdentityFile ~/.ssh/gitlab_id-rsa

  1. enter http://gitlab.com ,Profile Settings–>SSH Keys–>Add SSH Key

You are done