-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Installing pnpm 10.1.0 on windows fails with cannot find matching keyid
#9014
Comments
It affects all operating systems |
https://registry.npmjs.org/-/npm/v1/keys should now be returning two keys. During key rotation the old one was omitted by mistake and has since been re-added. CDN caching will of course take a little time to catch up but both the |
This comment has been minimized.
This comment has been minimized.
There has been a new release corepack@0.31.0 with updated npm keys. After a manual install: npm install -g corepack@latest I was then able to execute the following successfully: corepack use pnpm@10.1.0 |
In any case this wasn't an issue with pnpm directly. Thanks! |
Szia! Great to see that people started using v10. I am still a bit terrified to make it latest due to the big change with blocking scripts of dependencies by default. |
Szia! I've actually had more issues with eslint breaking where we haven't updated to eslint 9 yet. Even when I knew the issue it required a bit of fiddling, because the syntax and location where you specify the public hoist pattern was very odd + because in some cases it was due to a missing package in the Another possible breakage I can see is people relying on the post-install scripts being run regardless of packages needing update, although we haven't seen this yet. For example we had a graphql generation on post-install and I can imagine it taking some people by surprise that it doesn't run due to the new caching. And last but not least even with the corepack update fixing 10.1.0 in theory, on windows there is no neat way to update corepack, |
Workaround for keyid issues using Corepack Bash SHA_SUM=$(npm view pnpm@10.1.0 dist.shasum)
corepack install -g pnpm@10.1.0+sha1.$SHA_SUM Windows PowerShell $SHA_SUM = npm view pnpm@10.1.0 dist.shasum
corepack install -g pnpm@10.1.0+sha1.$SHA_SUM This may be needed for pnpm releases after |
Thanks for the solution @MikeMcC399 |
This should fix the issue ```microsoft#10 0.515 Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCIHGqHbvc2zImUPEPFpT4grh6rMYslel+lAjFArx8+RUdAiBfnJA+bgmUvO5Lctfkq+46KKDQdx/8RhLPge3pA+EdHA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]} ``` when running docker builds. See pnpm/pnpm#9014 (comment) for more context.
This should fix the issue ``` Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCIHGqHbvc2zImUPEPFpT4grh6rMYslel+lAjFArx8+RUdAiBfnJA+bgmUvO5Lctfkq+46KKDQdx/8RhLPge3pA+EdHA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]} ``` when running docker builds. See pnpm/pnpm#9014 (comment) for more context.
We started seeing issues with pnpm signatures, which is apparently fixed with a later corepack release. See pnpm/pnpm#9014
We started seeing issues with pnpm signatures, which is apparently fixed with a later corepack release. See pnpm/pnpm#9014.
## What are you changing? - Use a specific version of corepack ## Why? - The build is failing, see pnpm/pnpm#9014. This is a proposed fix also used in guardian/support-service-lambdas#2666
This should fix the issue ``` Cannot find matching keyid: {"signatures":[{"sig":"MEQCIHGqHbvc2zImUPEPFpT4grh6rMYslel+lAjFArx8+RUdAiBfnJA+bgmUvO5Lctfkq+46KKDQdx/8RhLPge3pA+EdHA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]} ``` when running docker builds. See pnpm/pnpm#9014 (comment) for more context. On my machine, I've run `docker build -f ./docker/Dockerfile .` before and after this change. Before I get the integrity error, after everything works again.
So, a while back Circle CI builds and Heroku builds started to fail. From all the threads I read, it seems like the [npm registry rotated it's signing keys](pnpm/pnpm#9014 (comment)) New pnpm versions were signed with the new key. Corepack, however, bundles a static set of trusted keys (from Node’s release), so it continued verifying signatures only against the old key. When it encountered packages signed with the new key, Corepack’s integrity check failed with “Cannot find matching keyid” errors.This mismatch caused Corepack’s integrity check to fail with “Cannot find matching keyid” errors. Workarounds include the following 1. Updating Corepack (to 0.31.0), they [upgraded their package](https://github.com/nodejs/corepack/releases/tag/v0.31.0) to include the new integrity check keys. But we seldom control what's going on with the CI, also, updating this across our scripts is going to be a painful task. Besides Heroku has [made some fixes](heroku/buildpacks-nodejs#1010) around this 2. Disabling integrity checks 🔥 #YOLO 3. Pinning `pnpm` to older versions, or pinning it to a newer version with the checksum in place. Doing the third one here, running `corepack use pnpm@9.15.5` fixes this, [ref](pnpm/pnpm#9014 (comment)) We can get rid of this over time as CDN caches used by build systems are refreshed. But the change in this PR is not disruptive in anyway, only rigidly secure. Fixes: #10832 --- Here are the threads to follow - pnpm/pnpm#9014 - pnpm/pnpm#9029 - nodejs/corepack#612 - nodejs/corepack#616 - heroku/buildpacks-nodejs#1010 --------- Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
This backports node update of corepack to 0.31.0, updating npmjs.org keys pinned by corepack. This should fix the following error: corepack install -g pnpm@10.2.1 Installing pnpm@10.2.1... Internal Error: Cannot find matching keyid: {"signatures":[{"sig":"MEYCIQDkZyZZmBzkRcQowEEFiEcGp4/xV8GBLXxTEzz9QstrsAIhAPx6tvZixjTub6GPqJa82vcWFhUU39JCtoJvcoRK/K39","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]} Link: pnpm/pnpm#9014 Link: nodejs/corepack#612 Link: misskey-dev/misskey#15386 Link: https://github.com/nodejs/corepack/releases/tag/v0.31.0 Link: nodejs/node@63c1859 Link: nodejs/node#56795 Backport-of: 63c1859e019465cbb0b6b46ba0d481fb41d94a22 Reviewed-by: xtex <xtex@aosc.io> Signed-off-by: xtex <xtex@aosc.io>
This backports node update of corepack to 0.31.0, updating npmjs.org keys pinned by corepack. The patch should be removed after nodejs 22.14.0 proposal gets released. This should fix the following error: corepack install -g pnpm@10.2.1 Installing pnpm@10.2.1... Internal Error: Cannot find matching keyid: {"signatures":[{"sig":"MEYCIQDkZyZZmBzkRcQowEEFiEcGp4/xV8GBLXxTEzz9QstrsAIhAPx6tvZixjTub6GPqJa82vcWFhUU39JCtoJvcoRK/K39","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]} Link: nodejs/node#56910 Link: pnpm/pnpm#9014 Link: nodejs/corepack#612 Link: misskey-dev/misskey#15386 Link: https://github.com/nodejs/corepack/releases/tag/v0.31.0 Link: nodejs/node@63c1859 Link: nodejs/node#56795 Backport-of: 63c1859e019465cbb0b6b46ba0d481fb41d94a22 Reviewed-by: xtex <xtex@aosc.io> Signed-off-by: xtex <xtex@aosc.io>
This backports node update of corepack to 0.31.0, updating npmjs.org keys pinned by corepack. The patch should be removed after nodejs 22.14.0 proposal gets released. This should fix the following error: corepack install -g pnpm@10.2.1 Installing pnpm@10.2.1... Internal Error: Cannot find matching keyid: {"signatures":[{"sig":"MEYCIQDkZyZZmBzkRcQowEEFiEcGp4/xV8GBLXxTEzz9QstrsAIhAPx6tvZixjTub6GPqJa82vcWFhUU39JCtoJvcoRK/K39","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]} Link: nodejs/node#56910 Link: pnpm/pnpm#9014 Link: nodejs/corepack#612 Link: misskey-dev/misskey#15386 Link: https://github.com/nodejs/corepack/releases/tag/v0.31.0 Link: nodejs/node@63c1859 Link: nodejs/node#56795 Backport-of: 63c1859e019465cbb0b6b46ba0d481fb41d94a22 Reviewed-by: xtex <xtex@aosc.io> Signed-off-by: xtex <xtex@aosc.io>
Verify latest release
pnpm version
10.1.0
Which area(s) of pnpm are affected? (leave empty if unsure)
Operating System (Windows, MacOS, Linux)
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
corepack install --global pnpm@10.1.0
or even
pnpm self-update
failsOddly installing any other pnpm version seems to work, and the error isn't the same as when trying to install a non-existent version
Describe the Bug
Expected Behavior
pnpm 10.1.0 gets installed
Which Node.js version are you using?
Node.js v22.1.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: