报错
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:Btf6f9sB7g3B/evMro0X6mWwzo7qosNZb8Hh7RhMsQ8.
Please contact your system administrator.
Add correct host key in /home/gerrit/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/gerrit/.ssh/known_hosts:2
ECDSA host key for [172.17.197.87]:29418 has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.
注意报错的地址: [172.17.197.87]:29418
解决办法
[gerrit@localhost code]$ ssh-keygen -R [172.17.197.87]:29418 # -R后面的内容是报错的那段地址
# Host [172.17.197.87]:29418 found: line 2
/home/gerrit/.ssh/known_hosts updated.
Original contents retained as /home/gerrit/.ssh/known_hosts.old
网友评论