npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
人々は.ssh/known_hosts
ファイルにホストの鍵を追加することによって、このエラーを解決often。問題は、正しいキーがすでに存在していることです。それがなければ、git clone <git repo url>
は同じエラーで失敗しますが、失敗します。リポジトリは正常にリポジトリをクローンします。
問題をデバッグするために(git clone
と、それはデバッグ情報を出力しながら)、私は~/.ssh/config
ファイルを経由してDEBUG3
にSSHのログレベルを設定しようとしましたが、出力は変化しませんでした。
そのため、Azureのnpm
で使用されているSSHクライアントが~/.ssh
ディレクトリを考慮していないという問題があると思われます。
私の質問は、これはどこか文書化されていますか、それともバグですか?どのコンポーネントがバグであるかを知っていますか?
FTR、全出力は次のとおりです。
npm ERR! git clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85: Cloning into bare repository 'D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85'...
npm ERR! git clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85:
npm ERR! git clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85: Host key verification failed.
npm ERR! git clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85: fatal: Could not read from remote repository.
npm ERR! git clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85:
npm ERR! git clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85: Please make sure you have the correct access rights
npm ERR! git clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85: and the repository exists.
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\4.2.3\\node.exe" "D:\\Program Files (x86)\\npm\\3.5.1\\node_modules\\npm\\bin\\npm-cli.js" "install" "git+ssh://<git repo url>"
npm ERR! node v4.2.3
npm ERR! npm v3.5.1
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=D:\local\AppData\npm-cache\_git-remotes\_templates --mirror <git repo url> D:\local\AppData\npm-cache\_git-remotes\git-ssh-<git repo url>-dc8c35134031285cb7109c3e32618e85
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!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\foo\npm-debug.log
あなたはこれを理解しましたか?私はここで同じ問題に取り掛かっているようだ。 – puzzle
「この問題はGitHubで見つかりました」(https://github.com/projectkudu/kudu/issues/1044)、npmで使用される '%USERPROFILE% 'に別の' .ssh'設定フォルダがあることを示します。私の壊れたインスタンスでは、このフォルダは空でした。作業中のインスタンスには、 'D:\ home \ .ssh'にあるものと同じ設定が含まれていました。不足しているSSH設定ファイルを自宅からコピーして固定しました。 – puzzle