You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git push
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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/jimfu/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/jimfu/.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.
Find your 'known_hosts' file.
In my case it is in directory c:/Users/jimfu/.ssh/
Using file explorer, change to the .ssh directory.
cp known_hosts known_hosts_old # save a copy, just in case
edit known_hosts with your text editor --- it is just a text file.
The file is 'ugly' as it has long 'host keys'
Delete the line that has 'github.com' in it.
There may be other lines that have various ip addresses used by Github.com. Delete these also
There may be lines unrelated to Github. Do not delete these.
You can find the 'owner' of an ip address by a search. e.g. ip 140.82.112.4 shows Github as owner
Copy the new RSA host key as given in the github.blog link above. It starts as
github.com ssh-rsa AAAA
Paste that new line into known_hosts
Save known_hosts.
Now you are ready to push. You will probably see a warning from the push that looks like:
git push
Warning: Permanently added the RSA host key for IP address '140.82.114.4' to the list of known hosts.
(And then the normal output from git push will appear).
Anyone pushing a repository (@drdhaval2785 @Andhrabharati @AnnaRybakovaT @funderburkjim or others)
may encounter an alarming message.
This is discussed at https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
Never fear! This is not too hard to remedy.
Below is one way to do it.
The text was updated successfully, but these errors were encountered: