New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Host key verification failed #6805
Comments
The code that generates the problem is as follows: const tempLocation = await cafs.tempDir();
if (allowedHosts.size > 0 && shouldUseShallow(resolution.repo, allowedHosts)) {
await execGit(["init"], { cwd: tempLocation });
await execGit(["remote", "add", "origin", resolution.repo], { cwd: tempLocation });
await execGit(["fetch", "--depth", "1", "origin", resolution.commit], { cwd: tempLocation });
} else {
await execGit(["clone", resolution.repo, tempLocation]);
} The actual execution is the following command
After multiple steps, the following error is finally reported: Remove +ssh from the url, it directly reports the above error
Why use git+ssh here instead of directly using git? |
While this is certainly a bug on pnpm's part, for the time being, the latest version of |
@liangjl76 I forgot to say thank you for your own investigation on this bug, without it, it would have taken me a longer time to find the cause and solve it. |
I had to temporarily revert the fix but we'll have another fix. |
#6832 should fix both this bug and the other bug. Please let me know if it doesn't. |
I can't install repo https://github.com/signal-ai/angular-sha1.git ERROR Command failed with exit code 128: git ls-remote git+ssh://git@github.com/SignalMedia/angular-sha1.git HEAD With https protocol command git ls-remote working, with git+ssh not. Pnpm Version 7.33.4 is ok, but 7.33.6 or 8.7.1 have this error.. |
@orgoj Why would you want to use ssh on a public repo? |
@KSXGitHub I don't use ssh on public repo. In package.json i have https, but pnpm try git ls-remote with git+ssh. |
This repo doesn't even have |
Repo |
pnpm version:
8.6.7
Code to reproduce the issue:
pnpm add jsdoc@3.2.0
Actual behavior:
pnpm: Command failed with exit code 128: git -c core.longpaths=true fetch --depth 1 origin 95c5d505
Host key verification failed.
fatal: Could not read from remote repository.
Additional information:
ERROR Command failed with exit code 128: git -c core.longpaths=true fetch --depth 1 origin 95c5d505
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
pnpm: Command failed with exit code 128: git -c core.longpaths=true fetch --depth 1 origin 95c5d505
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
at makeError (E:\prog\npm\node_modules\pnpm\dist\pnpm.cjs:24796:17)
at handlePromise (E:\prog\npm\node_modules\pnpm\dist\pnpm.cjs:25367:33)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async gitFetcher (E:\prog\npm\node_modules\pnpm\dist\pnpm.cjs:113063:11)
at async fetcher (E:\prog\npm\node_modules\pnpm\dist\pnpm.cjs:125600:16)
at async run (E:\prog\npm\node_modules\pnpm\dist\pnpm.cjs:124984:23)
Progress: resolved 8, reused 0, downloaded 8, added 0
node -v
prints:v16.18.1The text was updated successfully, but these errors were encountered: