如何通过命令行安装用于iOS开发的开发者证书/私钥和配置文件?
我正在为 iOS 应用程序项目配置自动构建服务器。 我已经完成了大部分。现在,这是最后一轮。保安。
开发人员证书/私钥和配置文件可以通过 GUI 轻松安装到钥匙串中。但我想通过命令行来实现这一点,甚至可以自动化配置过程。 通过命令行导出/导入证书、私钥、配置文件。
任何建议将不胜感激。
I'm configuring automated build server for iOS application project.
I've done most of it. Now, it's the final round. The security.
Developer certificate/private key and provisioning profile can be easily installed into Keychain with GUI. But I want to do this via command line to automate even the configuring process. Exporting/importing certificates, private keys, provisioning profiles via command line.
Any recommendations will be very appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
始终允许 GUI 被触发,因为尚未为 codesign 提供访问您的私钥的 acl。试试这个:
-T 标志告诉安全性允许 codesign 访问您在 Certificate.p12 中导入的密钥。
The always allow GUI is being triggered because codesign hasn't been given an acl to access your private key. try this:
The -T flag tells security to allow codesign to have access to the keys you are importing in Certificate.p12.
我从以下地方找到了提示:
http://lists.apple.com/archives/apple-cdsa /2010/Mar/msg00021.html
该命令是
security
。我正在阅读手册页。我将在试用后稍后更新此答案:)--(编辑)--
首先,我们必须手动授予“始终允许”对钥匙串中的证书/密钥的访问权限。我不知道如何在没有 GUI 的情况下做到这一点。
并在为每个会话运行构建工具之前运行命令
security unlock-keychain
。我使用了 SSH,所以我必须为每个登录会话执行一次。I found hints from:
http://lists.apple.com/archives/apple-cdsa/2010/Mar/msg00021.html
The command is
security
. I'm reading manual page. I'll update this answer later after trial :)--(edit)--
First, we have to give 'Always Allow' access to the certificates/keys in the Keychain manually once. I don't know how to do this without GUI.
And run the command
security unlock-keychain
before running build tool for every session. I've used SSH, so I had to execute it once for every login sessions.使用命令行安装证书:
安装移动配置文件:
简单方法:
复杂方法:
Install certificate using command line:
Install mobile provision profile:
The simple way:
The complex way: