簡體   English   中英

npm 安裝錯誤:“主機密鑰驗證失敗。”

[英]npm install error : “Host key verification failed.”

我想從 Gitbucket 獲取模塊,我在 Windows 服務器上構建了它。
但是當我使用npm install時出現錯誤。

npm ERR! Error while executing:  
npm ERR! C:\Users\~~~~\AppData\Local\Programs\Git\cmd\git.EXE ls-remote -h -t  
ssh://git@IPaddress:Gitbucketport/root/modulename.git  
npm ERR!  
npm ERR! Host key verification failed.  
npm ERR! fatal: Could not read from remote repository.  
npm ERR!  
npm ERR! Please make sure you have the correct access rights  
npm ERR! and the repository exists.  
npm ERR!  
npm ERR! exited with error code: 128  
npm ERR! A complete log of this run can be found in:  
npm ERR!     C:\Users\~~~~\AppData\Roaming\npm-cache\_logs\2020-09-09T07_20_32_049Z-debug.log  

當前驗證結果。

  • ssh 主機名@端口
    → 確定
  • git clone git+ssh://git@IPaddress:Gitbucketport/root/modulename.git
    → 確定

但是,我對某事很好奇。

  1. 我重新安裝了OpenSSH。
  2. git clone 上的指紋現在是 ecdsa。
  3. git clone 上的指紋與服務器上 ssh_host_ecdsa_key.pub 中的指紋不匹配。

請幫我。 謝謝你。

更新您的本地 known_hosts 文件:

ssh-keyscan -t rsa server.com >>~/.ssh/known_hosts

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM