fix: work around electron-builder keychain partition-list bug - #81
Merged
Merged
Conversation
electron-builder 26.15/26.16's CSC_LINK handling creates a temp keychain with a random unlock password, but passes CSC_KEY_PASSWORD (the cert's import password) to `set-key-partition-list -k` instead of that keychain password — so signing always fails with "SecKeychainUnlock: The user name or passphrase you entered is not correct", regardless of whether the cert/password are correct (electron-userland/electron-builder#10066, fixed upstream but not yet in a published release). Import the certificate ourselves via apple-actions/import-codesign-certs instead, and let electron-builder auto-discover the identity, sidestepping its broken keychain path entirely.
afitzgerald
added a commit
that referenced
this pull request
Sep 30, 2026
fix: work around electron-builder keychain partition-list bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CSC_LINK-based signing has been failing withsecurity: SecKeychainUnlock: The user name or passphrase you entered is not correctregardless of the cert/password being correct.createKeychain()generates a random unlock password for the temp keychain, but itsset-key-partition-list -kcall passesCSC_KEY_PASSWORD(the cert's import password) instead — a real upstream bug (electron-userland/electron-builder#10066), fixed upstream but not yet in a published npm release.apple-actions/import-codesign-certs(which does the create/import/partition-list sequence correctly), then droppingCSC_LINK/CSC_KEY_PASSWORDfrom theyarn distenv so electron-builder auto-discovers the already-imported identity instead of handling the keychain itself.Test plan
v0.0.5after merge and confirm the "Build, sign, notarize, and publish the DMG" step gets past code signing.dmg/.zipland on the GitHub release andbrew install --cask afitzgerald/diffier/diffierworks