DEV Community

Panayiotis Georgiou
Panayiotis Georgiou

Posted on • Originally published at panayiotisgeorgiou.net on

How to Fix GitHub Error – WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

error-temrinal

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!

err

Error in Terminal

***Normally, this is a very serious error, and you should pay attention to it.

error-vscode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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.

follow-instagram

Follow me on Instagram

😉 *That’s it for now. *

If you liked this article, then please subscribe to my YouTube Channel for video tutorials.

You can also find me on Twitter and Facebook.

The post How to Fix GitHub Error – WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! appeared first on Panayiotis Georgiou.

Top comments (0)