pnpm / action-setup

Install pnpm package manager
https://github.com/marketplace/actions/setup-pnpm
MIT License
942 stars 90 forks source link

Permission denied errors with github repo references in transitive deps #119

Open JustinBeckwith opened 7 months ago

JustinBeckwith commented 7 months ago

I am trying to use dependabot on our project which uses pnpm. For most PRs, everything works great. Specifically with dependabot PRs though ... we get the error referenced below. Here is an example run: https://github.com/discord/embedded-app-sdk/actions/runs/8651044410/job/23720870382?pr=115

It appears that this is specifically a problem with https://github.com/uNetworking/uWebSockets.js, which is not available on npm. The package https://www.npmjs.com/package/@colyseus/uwebsockets-transport pulls it in as a dependency using a relative github path: https://github.com/colyseus/colyseus/blob/master/packages/transport/uwebsockets-transport/package.json#L10

At first I thought it was an issue with PRs from accounts that don't have write access ... but we have PRs from other external contributors where CI appears to work fine. What in the world is going on here 😆

Progress: resolved 1109, reused 0, downloaded 223, added 216
 ERROR  Command failed with exit code [12](https://github.com/discord/embedded-app-sdk/actions/runs/8651044410/job/23720870382?pr=115#step:5:13)8: /usr/bin/git clone git@github.com:uNetworking/uWebSockets.js.git /home/runner/setup-pnpm/node_modules/.bin/store/v3/tmp/_tmp_1813_28694926017d535a86eb55866da40083
Cloning into '/home/runner/setup-pnpm/node_modules/.bin/store/v3/tmp/_tmp_18[13](https://github.com/discord/embedded-app-sdk/actions/runs/8651044410/job/23720870382?pr=115#step:5:14)_28694926017d535a86eb55866da40083'...
git@github.com: Permission denied (publickey).
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: /usr/bin/git clone git@github.com:uNetworking/uWebSockets.js.git /home/runner/setup-pnpm/node_modules/.bin/store/v3/tmp/_tmp_1813_28694926017d535a86eb55866da40083
Cloning into '/home/runner/setup-pnpm/node_modules/.bin/store/v3/tmp/_tmp_1813_28694926017d535a86eb55866da40083'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
    at makeError (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.[15](https://github.com/discord/embedded-app-sdk/actions/runs/8651044410/job/23720870382?pr=115#step:5:16).6/node_modules/pnpm/dist/pnpm.cjs:27828:17)
    at handlePromise (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.6/node_modules/pnpm/dist/pnpm.cjs:28399:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async gitFetcher (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.6/node_modules/pnpm/dist/pnpm.cjs:117537:11)
    at async fetcher (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.6/node_modules/pnpm/dist/pnpm.cjs:130171:[16](https://github.com/discord/embedded-app-sdk/actions/runs/8651044410/job/23720870382?pr=115#step:5:17))
    at async run (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.6/node_modules/pnpm/dist/pnpm.cjs:129636:23)
JustinBeckwith commented 7 months ago

This may be a duplicate of https://github.com/npm/cli/issues/2610, if you're using any of the same underlying libraries 🤔