You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the experimental Corepack version manager for package managers is enabled when using cypress-io/github-action and the packageManager property in the project's package.json selects a package manager that has been signed with a new keyid, then dependency installation fails with:
This also affects unchanged packageManager versions in a workflow where the latest version of the package manager is using a new keyid for signing the package:
Currently npm and pnpm are affected. If Yarn releases a new version, then it will also be affected, even if nothing is changed in a user's workflow / package.json.
By default, cypress-io/github-action installs dependencies using a lockfile provided by the project in the workflow and it uses one of the package managers: npm, Yarn or pnpm as appropriate to do this.
cypress-io/github-action@v6 (the only currently supported version) is set up to run under Node.js 20 provided by the GitHub Actions runner
When Corepack attempts to use a package manager that has been signed with the new keyid, it fails for the above Corepack versions that include an outdated local copy of the keys.
Recommendation
At this time, monitor and assist with third-party actions to remediate. In the examples, only Yarn Modern uses the experimental Corepack, and only because Yarn itself recommends it. If Yarn releases a new version before GitHub Actions are fixed, then review at that time whether to leave the Yarn Modern examples pinned to "packageManager": "[email protected]" or whether to update them and implement a workaround (see below).
To work around the issue and immediately use a new package (see list above) requires setting the environment variable COREPACK_INTEGRITY_KEYS (see Corepack > Environment Variables)
COREPACK_INTEGRITY_KEYS can be set to an empty string or 0 to instruct Corepack to skip integrity checks, or to a JSON string containing custom keys.
This issue also affects packageManager versions which have not been signed with a new key, where the latest version of the packageManager has been signed with a new key. This is true currently for npm and pnpm, but not yet for Yarn.
MikeMcC399
changed the title
"Cannot find matching keyid" if Corepack enabled with new package manager
"Cannot find matching keyid" if Corepack enabled
Feb 4, 2025
Situation
If the experimental Corepack version manager for package managers is enabled when using
cypress-io/github-action
and the packageManager property in the project's package.json selects a package manager that has been signed with a new keyid, then dependency installation fails with:This also affects unchanged packageManager versions in a workflow where the latest version of the package manager is using a new keyid for signing the package:
Currently npm and pnpm are affected. If Yarn releases a new version, then it will also be affected, even if nothing is changed in a user's workflow /
package.json
.Background
Keys in the npm registry, located on the endpoint https://registry.npmjs.org/-/npm/v1/keys, were rotated on about Jan 22, 2025. The current set is now:
Packages that were signed after the key rotation, such as the following, are using the new keyid
SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U
This can be viewed by examining the
dist.signatures.keyid
property of a package, for instance:Assessment
cypress-io/github-action
installs dependencies using a lockfile provided by the project in the workflow and it uses one of the package managers: npm, Yarn or pnpm as appropriate to do this.cypress-io/github-action@v6
(the only currently supported version) is set up to run under Node.js 20 provided by the GitHub Actions runnergithub-action/action.yml
Lines 102 to 103 in b662908
NODE20_VERSION="20.18.2"
v20.18.2
bundles Corepack0.29.4
keyid
, it fails for the above Corepack versions that include an outdated local copy of the keys.Recommendation
At this time, monitor and assist with third-party actions to remediate. In the examples, only Yarn Modern uses the experimental Corepack, and only because Yarn itself recommends it. If Yarn releases a new version before GitHub Actions are fixed, then review at that time whether to leave the Yarn Modern examples pinned to
"packageManager": "[email protected]"
or whether to update them and implement a workaround (see below).Third-party actions
Corepack released [email protected]
Corepack open issue to address preventing a re-occurrence Saveguards for keyid mismatch nodejs/corepack#616
Please don't make error of fetching latest version information if packageManager field is specified. nodejs/corepack#625
Corepack / Node.js open issue to bundle [email protected] in Node.js LTS versions Node.js LTS rollout of minimum Corepack 0.31.0? nodejs/corepack#627 (two week's leadtime)
GitHub Actions to update
NODE20_VERSION
in https://github.com/actions/runner/blob/main/src/Misc/externals.sh to include any updated Node.js20.x
version which has [email protected] or later bundled in itGitHub Action
To work around the issue and immediately use a new package (see list above) requires setting the environment variable
COREPACK_INTEGRITY_KEYS
(see Corepack > Environment Variables)or set
COREPACK_INTEGRITY_KEYS=0
The text was updated successfully, but these errors were encountered: