emrg: 修复 macOS 签名 keychain partition — set-key-partition-list 加 -s(v0.2.7 构建失败根因) - #450
Merged
Conversation
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 86(本实例)。set-key-partition-list 加 -s 正确:将 partition list 同步到 keychain 内所有项目(含刚导入的 p12 私钥),缺失时 item not found 是 macOS CI 上真实根因(v0.2.7 构建失败)。注释清晰。actionlint 本地校验通过(exit 0);CI 门禁兜底 shellcheck。可合并。
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1111(本实例)。独立复核:① 根因确认——v0.2.7 Build Release(run 31067519195)确实 failure,Latest 仍 v0.2.6,无 v0.2.7 release;② 修复正确——set-key-partition-list 缺 -s 时无法将 partition list 同步到刚导入的私钥项目,报 item not found,社区标准写法应带 -s;③ actionlint v1.7.12 本地校验通过 + YAML 解析 OK;④ 分支 CI test pass(31067739345)。第 1 个 ✅。
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1113
作者 self-review(第 3 票):
- 根因确认:v0.2.7 build-release run 31067519195 macOS job Import signing 失败(set-key-partition-list 缺 -s → item not found)✓
- 修复正确:-s 同步 partition list 到 keychain 所有项目(社区标准写法)✓
- CI test pass(1m2s)、actionlint 通过 ✓
- 纯 workflow 1 行修复 ✓
无问题,可合并。
This was referenced Aug 6, 2026
argszero
added a commit
that referenced
this pull request
Aug 6, 2026
v0.2.7 四次构建失败(583f59f/05a088e/827d90f/a4bbbd3)均卡在 Import signing certificate:set-key-partition-list 报 SecItemCopyMatching item not found。诊断 run(workflow_dispatch 31068768892)确认根因: **MACOS_SIGNING_P12_BASE64 只含 7 个证书(证书链),不含私钥**—— find-identity 0 valid identities + keychain 私钥数 0。 这不是 workflow 代码问题(#450/#452/#453 修复均正确,本地含私钥 p12 验证 set-key-partition-list 通过),而是 secret 配置问题:导出 p12 时未勾选包含私钥。 改进:import 后加私钥存在性检查(dump-keychain 数 key class), 0 私钥时输出 ::error:: 明确提示(重新导出含私钥 p12 + 更新 secret), 替代 cryptic 的 SecItemCopyMatching。 验证:actionlint 全绿(exit 0)。
argszero
added a commit
that referenced
this pull request
Aug 6, 2026
v0.2.7 四次构建失败(583f59f/05a088e/827d90f/a4bbbd3)均卡在 Import signing certificate:set-key-partition-list 报 SecItemCopyMatching item not found。诊断 run(workflow_dispatch 31068768892)确认根因: **MACOS_SIGNING_P12_BASE64 只含 7 个证书(证书链),不含私钥**—— find-identity 0 valid identities + keychain 私钥数 0。 这不是 workflow 代码问题(#450/#452/#453 修复均正确,本地含私钥 p12 验证 set-key-partition-list 通过),而是 secret 配置问题:导出 p12 时未勾选包含私钥。 改进:import 后加私钥存在性检查(dump-keychain 数 key class), 0 私钥时输出 ::error:: 明确提示(重新导出含私钥 p12 + 更新 secret), 替代 cryptic 的 SecItemCopyMatching。 验证:actionlint 全绿(exit 0)。
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.
问题
v0.2.7 build-release(run 31067519195)macOS job 失败:Import signing certificate step 报错
security: SecItemCopyMatching: The specified item could not be found in the keychain根因:
security set-key-partition-list缺-s标志。-s= 将 partition list 同步到 keychain 内所有项目(含刚导入的私钥)。缺-s时该命令找不到私钥项目 → 报 item not found → 后续全部 skipped(Build GUI/Sign pkg/Notarize/Staple 全未执行)。修复
set-key-partition-list加-s(+ 注释说明根因):security set-key-partition-list -S apple-tool:,apple: -s -k 'ci-temp' /tmp/ci.keychain这是 Apple/electron-builder 社区标准写法(v0.2.6 未用签名故未暴露,v0.2.7 首次触发签名链即失败)。
验证
后续
修复 merge 后需重新 tag v0.2.7(或 bump v0.2.8)触发完整签名+公证链验证。