Git repository migration.

We have recently migrated Git repositories from an old server to another server with better hardware resources. Since the RSA host key will be different on the new Git server, user's might see below error while connecting to Git repositories using SSH.

Note: This is not applicable for user's connecting to Git repositories via HTTPS.

 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is e7:12:c4:08:7c:16:17:d7:ca:3d:2b:10:8b:76:a4:e2.

Please contact your system administrator. Add correct host key in /home/taylorg/.ssh/known_hosts to get rid of this message. Offending key in /home/taylorg/.ssh/known_hosts:2 RSA host key for 208.87.11.87 has changed and you have requested strict checking. Host key verification failed.

 

The above message means that the fingerprint for the host that was previously stored on your computer, no longer matches the target server. This is expected since the Git repositories are now migrated to a new server which will have a different fingerprint key than that of the old Git server.

This can be fixed by simply removing the stored fingerprint of old server from known_hosts file.

Steps to remove the old fingerprint from known_hosts :

*Open the known_hosts file: nano ~/.ssh/known_hosts.

*Delete the line containing the hostname of the server you’re trying to connect to (Ctrl+K).

*Ctrl+O to save the file, then Ctrl+X to exit nano. ​​

Have more questions? Submit a request

0 Comments

Article is closed for comments.