ci: iOS 临时钥匙串补导 WWDR 中间证书——修独占搜索列表后 unable to build chain
Design Source Checks / design-source (push) Successful in 20s
Deploy Client / build-client-web (push) Successful in 49s
Deploy Client / build-windows (push) Successful in 2m10s
Deploy Client / build-macos (push) Successful in 2m38s
Deploy Client / build-android (push) Successful in 1m17s
Deploy Client / build-ios (push) Successful in 3m41s
Deploy Client / release-deploy-client (push) Successful in 1m30s
Design Source Checks / design-source (push) Successful in 20s
Deploy Client / build-client-web (push) Successful in 49s
Deploy Client / build-windows (push) Successful in 2m10s
Deploy Client / build-macos (push) Successful in 2m38s
Deploy Client / build-android (push) Successful in 1m17s
Deploy Client / build-ios (push) Successful in 3m41s
Deploy Client / release-deploy-client (push) Successful in 1m30s
p12 只含叶子证书;独占后 login 里的 Apple WWDR 中间证书不可见, codesign 报 errSecInternalComponent。建 keychain 时从本机 login/System 导出 WWDR(纯公钥)一并导入。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
@@ -55,6 +55,17 @@ security unlock-keychain -p "$KEYCHAIN_PWD" "$KEYCHAIN"
|
||||
echo "${IOS_DIST_CERT_P12_BASE64}" | base64 --decode > "$WORK/dist.p12"
|
||||
security import "$WORK/dist.p12" -k "$KEYCHAIN" \
|
||||
-P "${IOS_DIST_CERT_PASSWORD:-}" -T /usr/bin/codesign -T /usr/bin/security
|
||||
# 补齐证书链:p12 只含叶子证书,独占搜索列表后 login 里的 Apple WWDR 中间证书
|
||||
# 不可见会报 errSecInternalComponent(unable to build chain)——把本机已有的
|
||||
# WWDR 中间证书(纯公钥)一并导入临时 keychain。
|
||||
security find-certificate -a -c "Apple Worldwide Developer Relations" -p \
|
||||
~/Library/Keychains/login.keychain-db /Library/Keychains/System.keychain \
|
||||
> "$WORK/wwdr.pem" 2>/dev/null || true
|
||||
if [ -s "$WORK/wwdr.pem" ]; then
|
||||
security import "$WORK/wwdr.pem" -k "$KEYCHAIN" -T /usr/bin/codesign 2>/dev/null || true
|
||||
else
|
||||
echo "WARN: 本机未找到 Apple WWDR 中间证书,签名可能报 unable to build chain" >&2
|
||||
fi
|
||||
# 允许 codesign 非交互访问私钥
|
||||
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PWD" "$KEYCHAIN" >/dev/null
|
||||
# 构建期独占搜索列表(fastlane 同款):只见临时 keychain,隔离本机其他项目的
|
||||
|
||||
Reference in New Issue
Block a user