1. 程式人生 > >gitlab伺服器遷移後再git pull 出錯

gitlab伺服器遷移後再git pull 出錯

公司運維不知道做了什麼操作,據說在遷移,遷移後就這樣了

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:/vss/vAvMe/rQVXO6SVbVRdqoZfvW0b7wYcFkKZInkY.
Please contact your system administrator.
Add correct host key in /Users/wxx/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/wxx/.ssh/known_hosts:41
RSA host key for [192.168.2.116]:31222 has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

這樣是因為我本地已經在~/.ssh/known_hosts檔案中記住了,在檔案刪除對應地址的資訊,再次訪問時,會提示

Are you sure you want to continue connecting (yes/no)?

這裡填入yes,這個只有通過ssh連線的才會有,如果利用username與password連線的則不會有些問題