javascript:void(null)gitLab---Host key verification failed.
公司用的是GitLab,突然發現pull和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 ECDSA key sent by the remote host is
SHA256:fyz9pKs5X55RS646N75q+q2/MUVXfl82TmKO2P52+do.
Please contact your system administrator.
Add correct host key in /Users/zhaolu/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/zhaolu/.ssh/known_hosts:1
ECDSA host key for git.dev.jhb.net has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.```
然後管伺服器的同事告訴我,**伺服器的IP變了**。
解決辦法是**刪除known_hosts檔案**(具體路徑上面有提示)。
zhaoludeMacBook-Pro:test zhaolu$ rm /Users/zhaolu/.ssh/known_hosts //刪除hosts
zhaoludeMacBook-Pro:test zhaolu$ ls /Users/zhaolu/.ssh/known_hosts
ls: /Users/zhaolu/.ssh/known_hosts: No such file or directory //刪除乾淨了
zhaoludeMacBook-Pro:test zhaolu$ git pull upstream master //拉取程式碼
The authenticity of host 'git.dev.test.net (60.205.126.31)' can't be established.
ECDSA key fingerprint is SHA256:fyz9pKs5X55RS646N75q+q2/MUVXfl82TmKO2P52+do.
Are you sure you want to continue connecting (yes/no)? yes //這裡填yes
Warning: Permanently added 'git.dev.test.net,60.205.126.31' (ECDSA) to the list of known hosts.
From git.dev.test.net:iOS/test
- branch master -> FETCH_HEAD
- [new branch] master -> upstream/master
Already up-to-date. //成功拉取程式碼```
網上還有其他方法,沒試,不知效果,本方法已親測可供大家參考。
相關文章
- SCP報錯:Host key verification failed.AI
- Mac SSH 連線出現 Host key verification failed. 錯誤解決MacAI
- SSH Host key verification failedAI
- ssh連線遠端伺服器出現Host key verification failed. lost connection問題的解決伺服器AI
- JavaScript void 運算子JavaScript
- Javascript:void(0)和#JavaScript
- 記錄一個生產環境小錯誤。SSH連線時,出現提示遠端密碼重置的報錯【Host key verification failed.】密碼AI
- [sublime xftp外掛] Host key verification failed ,錯誤處理FTPAI
- JavaScript 中 void(0) 的含義JavaScript
- SSH 登入失敗:Host key verification failed 的處理方法AI
- vscode中Git: host key verification failed的解決辦法VSCodeGitAI
- javascript:void(0)的作用是什麼JavaScript
- href="javascript:void(0);" considered harmfulJavaScriptIDE
- 前端戰五渣學JavaScript——void 運算子前端JavaScript
- 【JavaScript】奇怪的知識void 0 === undefined 為 trueJavaScriptUndefined
- javascript:void(0)語句的作用是什麼JavaScript
- Hashtable/HashMap與key/value為null的關係HashMapNull
- javascript中null是什麼JavaScriptNull
- JavaScript undefined與null區別JavaScriptUndefinedNull
- JavaScript keypress 事件JavaScript事件
- JavaScript keydown 事件JavaScript事件
- JavaScript keyup 事件JavaScript事件
- JavaScript基本概念整理(null、undefined)JavaScriptNullUndefined
- JavaScript中的“undefined、null”區別?JavaScriptUndefinedNull
- JavaScript 陣列 keys()JavaScript陣列
- JavaScript event.metaKeyJavaScript
- JavaScript event.shiftKeyJavaScript
- JavaScript event.ctrlKeyJavaScript
- JavaScript event.altKeyJavaScript
- JavaScript event.keyCodeJavaScript
- JavaScript keydown事件總結JavaScript事件
- 你知道void和Void的區別嗎
- 簡述static關鍵字、void與void *(void指標)、函式指標指標函式
- javascript運算子——條件、逗號、賦值、()和void運算子JavaScript賦值
- [VRDevice] Initialization of device oculus failed.VRdevAI
- C語言知識彙總 | 56-C語言NULL空指標以及void指標C語言Null指標
- ((NULL) null).printNULL();((NULL) null).printnull();Null
- JavaScript中0, "", null, false, undefined的區別JavaScriptNullFalseUndefined