【发布时间】:2020-04-21 11:20:01
【问题描述】:
我按照此处的说明生成用于签署我的应用程序的证书:https://help.apple.com/developer-account/#/devbfa00fef7
很遗憾,我无法使用以下命令对我的应用程序进行代码签名:
codesign --sign "Developer ID Application: My company (XXXXXX)" Test.app --deep
Developer ID Application: My company (XXXXXX): no identity found
我尝试使用以下命令列出我的身份但没有成功:
security find-identity
Policy: X.509 Basic
Matching identities
1) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Distribution: My Company (XXXXXXXXXX)"
2) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "3rd Party Mac Developer Installer: My Company (XXXXXXXXXX)"
3) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Development: Martin Delille (XXXXXXXXXX)"
4) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Distribution: My Company (XXXXXXXXXX)"
5) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Development: Martin Delille (XXXXXXXXXX)"
6) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Mac Developer: Martin Delille (XXXXXXXXXX)"
6 identities found
Valid identities only
1) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Distribution: My Company (XXXXXXXXXX)"
2) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "3rd Party Mac Developer Installer: My Company (XXXXXXXXXX)"
3) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Development: Martin Delille (XXXXXXXXXX)"
4) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Distribution: My Company (XXXXXXXXXX)"
5) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Apple Development: Martin Delille (XXXXXXXXXX)"
6) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Mac Developer: Martin Delille (XXXXXXXXXX)"
6 valid identities found
如您所见,我的 Developer Id Application 证书位于我的钥匙串中:
【问题讨论】:
-
证书当然在钥匙串中,但除非您也有钥匙,否则它不会显示为“有效身份”。通常 Keychain Access 会在您拥有密钥的任何证书旁边显示一个披露三角形。它在您的示例中不可见。
-
谢谢@gaige!我通过导出另一台能够签名到新机器的私钥来解决我的问题,它现在运行良好!如果您发表评论作为答案,我会接受! ;-)
标签: macos code-signing code-signing-certificate