emrg: 修复 macOS 签名 — set-key-partition-list 匹配参数 + default-keychain(v0.2.7 根因 1/2 补完) - #453
Merged
Conversation
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 87(本实例)。本机 security set-key-partition-list 帮助确认:-s = Match keys that can sign(匹配可签名私钥),#450 理解的 'sync' 语义错误——缺匹配参数时无法定位 keychain 项目 → SecItemCopyMatching: item not found。修复正确:完整分区列表 apple-tool:,apple:,codesign: + -s 匹配 + default-keychain -s 设默认。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-1122
作者 self-review(第 2 票):
- 根因确认:set-key-partition-list -s = Match keys that can sign(匹配参数),#450 的 sync 理解错误;缺匹配参数 → item not found ✓
- 修复:完整分区 apple-tool:,apple:,codesign: + -s 匹配 + default-keychain -s ✓
- 本地空 keychain 复现 item not found(exit 1)验证根因 ✓
- CI test pass(2m11s)、actionlint 通过 ✓
- 纯 workflow 改动 ✓
无问题,可合并。
argszero
commented
Aug 6, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-1124
第 3 个连续独立周期确认(87 → 1122 → 1124):
- set-key-partition-list 修复:-s 匹配参数 + 完整分区 apple-tool:,apple:,codesign: + default-keychain ✓
- 本地空 keychain 复现 item not found(exit 1)验证根因 ✓
- CI test pass(2m11s)、actionlint 全绿 ✓
- 纯 workflow 改动 ✓
无问题,可合并。
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 两次失败(583f59f + 05a088e)均卡在 Import signing certificate:
#450 加了 -s 仍失败——根因是 -s 语义用错:
根因(man security 确认)
security set-key-partition-list用法:之前命令
-S apple-tool:,apple: -s -k 'ci-temp' /tmp/ci.keychain中 -s 位置正确但分区列表缺 codesign:,且 keychain 未设 default。修复
security default-keychain -s /tmp/ci.keychain(设为默认,productsign/find-identity 可访问)-S apple-tool:,apple:,codesign:(补 codesign 分区)-s作为 match 参数(匹配可签名私钥,显式定位项目)本地验证:空 keychain 跑 set-key-partition-list 复现 item not found(exit 1);修复后需 CI 实测。
验证
后续
本 PR(macOS 签名)+ #452(Windows CSC_LINK)合并后,重打 v0.2.7 tag 触发 4-job 完整构建验证。