Skip to content
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

build: work around npm install path ssh bug #132

Merged
merged 1 commit into from
Apr 16, 2024
Merged

build: work around npm install path ssh bug #132

merged 1 commit into from
Apr 16, 2024

Conversation

JustinBeckwith
Copy link
Contributor

@JustinBeckwith JustinBeckwith commented Apr 15, 2024

Hopefully this fixes the issue with github install paths in package.json that's breaking dependabot PRs. There is currently an issue where all PRs submitted by dependabot fail CI, due to pnpm install failing:

Scope: all 11 workspace projects
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +1080
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1080, reused 0, downloaded 199, added 193
Progress: resolved 1080, reused 0, downloaded 454, added 45[7](https://github.com/discord/embedded-app-sdk/actions/runs/8682264272/job/23806513064?pr=131#step:5:8)
 ERROR  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_192[8](https://github.com/discord/embedded-app-sdk/actions/runs/8682264272/job/23806513064?pr=131#step:5:9)_d7038f93d0b9931c19e46a0377dcac29
Cloning into '/home/runner/setup-pnpm/node_modules/.bin/store/v3/tmp/_tmp_1[9](https://github.com/discord/embedded-app-sdk/actions/runs/8682264272/job/23806513064?pr=131#step:5:10)28_d7038f93d0b9931c19e46a0377dcac29'...
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_1928_d7038f93d0b9931c19e46a0377dcac29
Cloning into '/home/runner/setup-pnpm/node_modules/.bin/store/v3/tmp/_tmp_1928_d7038f93d0b9931c19e46a0377dcac29'...
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.7/node_modules/pnpm/dist/pnpm.cjs:24966:17)
    at handlePromise (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.7/node_modules/pnpm/dist/pnpm.cjs:25537:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async gitFetcher (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.7/node_modules/pnpm/dist/pnpm.cjs:[11](https://github.com/discord/embedded-app-sdk/actions/runs/8682264272/job/23806513064?pr=131#step:5:12)4675:11)
    at async fetcher (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.7/node_modules/pnpm/dist/pnpm.cjs:[12](https://github.com/discord/embedded-app-sdk/actions/runs/8682264272/job/23806513064?pr=131#step:5:13)7309:16)
    at async run (/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.7/node_modules/pnpm/dist/pnpm.cjs:126774:23)

There are two factors here causing the issue. This package, which is pulled in as a transitive dependency of an exmaple, is not published to github:
https://www.npmjs.com/package/uws

That triggers this bug in npm:
npm/cli#2610

Which appears to create problems in github actions when there's no token/user available to do the clone.

Copy link
Collaborator

@matthova matthova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursed, but thank you for linking to more context

@JustinBeckwith JustinBeckwith merged commit 188f6b5 into main Apr 16, 2024
1 check passed
@JustinBeckwith JustinBeckwith deleted the sshhack branch April 16, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants