Surprised by Github; their RSA SSH host key has been updated in the last week of March

Trying to push some new code to github, I’ve received the following thing:

PS D:\projects\SimpleBank> git push -u origin main -v
Pushing to github.com:andonescu/tpg-simple-bank.git
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in /c/Users/en_ia/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/en_ia/.ssh/known_hosts:1
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

It looks like things have changed: https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

To overpass this locally, the solution is simple (just to remove the old key):

ssh-keygen -R github.com

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.