If you encounter the error message “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!” when using Git or GitHub, it typically means that the SSH fingerprint for the remote host has changed since the last time you connected to it. This post will indicate you How to Fix GitHub Error – WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
Error in Terminal
***Normally, this is a very serious error, and you should pay attention to it.
Error VS code
Why this happened?
It turns out GitHub updated their RSA SSH host key a few days ago because it was briefly exposed in a public GitHub repo.
The Solution
I fixed the problem by removing the old SSH key with the following command:
ssh-keygen -R github.com
Then the next time I ran git push
I added the new SSH key by answering yes
to the following question:
Are you sure you want to continue connecting (yes/no)? yes
I’m running Windows 10 with PowerShell and git version 2.30.1
.
For more information about why GitHub updated their SSH key see here.
That’s it for now.
If you liked this article, then please subscribe to my YouTube Channel for video tutorials.