Closed bexnoss closed 2 years ago
npm install
seems to work fine.
What did the error say when you npm ci
?
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/actions/setup-python.git
npm ERR!
npm ERR! git@github.com: Permission denied (publickey).
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
It's caused by https://github.com/npm/cli/issues/2610.
NPM v7 always tries to use SSH to clone GitHub repos but in workflow runs on forks SSH isn't configured. For the internal cache PR I made it try npm ci
first and fallback to npm install
if that fails: https://github.com/jurplel/install-qt-action/pull/137/commits/f5b95ab6f517cb87b74ad035633b9fd0ae218b8e.
NPM v7 always tries to use SSH to clone GitHub repos...
I checked Previous Releases | Node.js and found that all LTS versions of node.js are not using NPM v7 (either v6 or v8). Can we solve it by using LTS node.js?
I think it used to work differently in NPM v6 and since NPM v7 it uses SSH for github/...
versions.
Apparently the version can be rewritten (https://github.com/npm/cli/issues/2610#issuecomment-914610832) to make it work though.
npm ci
fails for workflow runs on forks, is there a special requirement why it should be used? Couldnpm install
be used instead?