Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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 []:1234
3) Pull from repo
git pull
4) You should see something similar to this. Answer 'yes' when asked.
The authenticity of host '[]:1234 ([]: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 '[]:,[]: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