본문 바로가기

카테고리 없음

GIt 깃 에러(github) REMOTE HOST IDENTIFICATION HAS CHANGED

반응형

한동안 push는 안하고 로컬에서 커밋만 하다가 이번에 push를 하니 vscode 에디터에서 골뱅이 에러가 난다 ^^ 

@@@@@@@@@@@@@@@@@@@ 상세내용을 보면  아래와 같다. 내용을 보고 헉! 했는데, 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:uNiVztksCsDhcc0u9e---------------------------------.
Please contact your system administrator.
Add correct host key in /c/Users/****/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/****/.ssh/known_hosts:1
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.

 

원인은 알고보니 github에서 변경된 인증방식 때문이다. (아래 내용은 stackoverflow로 부터 발췌)

이는 2023년 3월 24일 GitHub가 GitHub.com의 Git 작업을 보호하는 데 사용되는 RSA SSH 호스트 키를 업데이트했기 때문에 발생했습니다. 비공개 키가 공개 GitHub 리포지토리에 잠시 노출되었기 때문입니다. 해당 날짜 이전에 SSH 클라이언트에서 GitHub의 이전 키 지문을 기억했다면 해당 메시지를 받게 됩니다.

 

그래서 아래 처럼 키를 갱신해줘야 한다. 

ssh-keygen -R github.com

그럼 이제 에러 없이 gitgub을 사용가능하다~

https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/#what-you-can-do

반응형