2023-03-23 ​​- Problema de GitHub: LA IDENTIFICACIÓN DEL HOST REMOTO HA CAMBIADO [duplicate]

1 minuto de lectura

Avatar de usuario de Jérémy
Jérémy

Recientemente recibí el siguiente error hoy cuando traté de fetch, pull o push mi código de/a mi repositorio habitual de GitHub:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ~/.ssh/known_hosts to get rid of this message.
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.

Luché por descubrir cómo resolverlo y de dónde venía.

¡Esperemos que hayan publicado un artículo ayer sobre eso!

Para resumir, aquí está la respuesta a su problema:

ssh-keygen -R github.com
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >> ~/.ssh/known_hosts

Pero no confíes en mí a ciegas y echa un vistazo a la entrada del blog:
https://github.blog/2023-03-23-actualizamos-nuestra-clave-de-host-ssh-rsa/

  • Podría ser útil reflejar la huella digital de la nueva clave correcta aquí: SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s (¡pero obviamente verifique dos veces en el artículo!)

    – Joaquín Sauer

    24 de marzo a las 13:07


¿Ha sido útil esta solución?