0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Github fetchしようとしたらエラーが出た

Posted at

概要

  • ローカルリポジトリでfetchを行おうとしたらエラーが発生してできなかった。解決までの流れをまとめる。

問題発生までの経緯

  • push pullなどの経験のあるローカルリポジトリで下記コマンドを実行してfetchを行った。

    git fetch
    

問題

  • 下記のエラーが発生してfetchができない。

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

問題解決までの経緯

  • 下記の様にUsers/FooVar/.ssh/known_hostsの3行目に問題があるらしい。

    Offending RSA key in /Users/FooVar/.ssh/known_hosts:3
    
  • ひとまず当該のファイルをエディタで開いて直接削除してみる。

  • 確認のためにfetchを行った。

  • 問題は解決した。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?