Permission denied errors with github repo references in transitive deps
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 217
- Avg merge
- 8h 42m
- Merged PRs (30d)
- 1
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked GitHub Actions run and the package.json dependency declaration for @colyseus/uwebsockets-transport. Reproduce the pnpm install and trace why the transitive uWebSockets.js dependency is cloned through SSH. Done means the cause is established and the workflow no longer fails with the reported permission error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github-actions, typescript
- Domain
- ci-cd, devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100