[Github] RSA SSH host key 업데이트

2023. 5. 12. 21:39trouble shoot

Go 언어 공부하면서 기록을 남겨 볼까 하여.. Github에 소스를 올리려고 하는데..

 

아래의 오류 메세지가 발생했다.

$ git push -u origin main
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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/username/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/username/.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.

에러 메세지중 아래의 내용으로 구글링해 보니

더보기

Please contact your system administrator.
Add correct host key in /c/Users/username/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/username/.ssh/known_hosts:1
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.

 

github가  3월 24일에 RSA host key 를 업데이트 하여 발생하는 현상으로 key 만 새로 업데이트 하면 된다.

 

  1. ssh-key 명령으로 github 에 대한 key 를 새로 생성한다.
  2. ~/.ssh/known_hosts 파일에 새로운 키에 대한 내용을 수동으로 업데이트 한다.

https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

 

We updated our RSA SSH host key | The GitHub Blog

At approximately 05:00 UTC on March 24, out of an abundance of caution, we replaced our RSA SSH host key used to secure Git operations for GitHub.com.

github.blog