pnpm: Host key verification failed
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 (<anonymous>) 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 -vprints:v16.18.1- Windows, macOS, or Linux?:windows – Microsoft Windows [版本 10.0.14393]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 17 (8 by maintainers)
Commits related to this issue
- fix(git-resolver): wrong scheme to `git ls-remote` fixes https://github.com/pnpm/pnpm/issues/6805 — committed to pnpm/pnpm by KSXGitHub 3 years ago
- fix(git-resolver): wrong scheme to `git ls-remote` (#6806) close #6805 — committed to pnpm/pnpm by KSXGitHub 3 years ago
- fix(git-resolver): wrong scheme to `git ls-remote` (#6806) close #6805 — committed to pnpm/pnpm by KSXGitHub 3 years ago
https://github.com/pnpm/pnpm/issues/7517 I am also confused. This problem still exists in 9.6.0
Not sure why this is closed, the issue is still present (tested on pnpm v9.5.0). pnpm will always use ssh even if the package.json/pnpm-lock.yaml uses an https url
Current workaround if installing in a container is to force git to clone via https for the specific packages you need, e.g.:
@KSXGitHub I don’t use ssh on public repo. In package.json i have https, but pnpm try git ls-remote with git+ssh.
@KSXGitHub @zkochan Can anyone review this? This seems not correctly fixed.
Private keys are not supposed to exist on GitHub Workflows, so the following errors are throw when pnpm force using ssh to clone:
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 git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.
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…