Githubに新しくリポジトリを追加して、既存のプロジェクトをpushしようとした時に以下のエラーが出ました。
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Please contact your system administrator.
Add correct host key in /Users/user/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/user/.ssh/known_hosts:1
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.
今回はこのエラーの解消方法についてまとめていきます。
といっても解消方法は簡単で、以下のコマンドを実行します。
$ ssh-keygen -R github.com
これでOKです。
次にpushなどをしようとするとこんなのが出ますが、 yes
を入力すればOKです。
Are you sure you want to continue connecting (yes/no/[fingerprint])?