Skip to content

Instantly share code, notes, and snippets.

@whoisryosuke
Forked from kany/gist:3714996
Created November 22, 2021 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whoisryosuke/3c482e593dee25e2b9d52f0f850b91ba to your computer and use it in GitHub Desktop.
Save whoisryosuke/3c482e593dee25e2b9d52f0f850b91ba to your computer and use it in GitHub Desktop.
Git Repo changes ssh fingerprint - how to update your known_hosts file
1) Open known_hosts file and look for the invalid host
nano ~/.ssh/known_hosts
2) Remove the line that has the invalid host. Should be the same host in your .git/config of your repo
ssh-keygen -R [dev.blahblah.com]:1234
3) Pull from repo
git pull
4) You should see something similar to this. Answer 'yes' when asked.
The authenticity of host '[dev.blahblah.com]:1234 ([1.2.3.4]:1234)' can't be established.
RSA key fingerprint is 4d:70:fc:34:43:3d:93:9e:42:29:cz:94:48:51:cz:18.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[dev.blahblah.com]:1.2.3.4,[9.8.7.6]:1234' (RSA) to the list of known hosts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment