简体   繁体   English

Iphone钥匙串访问下导出/导入证书,私钥的问题

[英]The issues of exporting/importing certificate , private key under keychain access for Iphone

I want to export the certificate and private key from one machine to another so I can reuse the provisioning profile.我想将证书和私钥从一台机器导出到另一台机器,以便我可以重用配置文件。

There's a private key under the certificate in keychain access.钥匙串访问的证书下有一个私钥。

1)I exported the the certificate as certifcate.cer file then I imported that from another machine. 1)我将证书导出为 certifcate.cer 文件,然后从另一台机器导入。 However, it's missiong the private key.但是,它的任务是私钥。 and xcode on the new machine complaining no valid signing key available for the imported provisioning profile.和 xcode 在新机器上抱怨导入的配置文件没有有效的签名密钥。

2) Next I try to export the certificate and the private key as personal information exhange.p12 format, this time it prompted me to input a password which I did. 2)接下来我尝试将证书和私钥导出为个人信息exhange.p12格式,这次它提示我输入密码。

3)I imported the.p12 file into the new machine, this time the new machine complaining error, cannot read the contents. 3)我将.p12文件导入新机,这次新机报错,无法读取内容。

So, what should I do to properly export both the certificate and private key and import them into the new machine.那么,我应该怎么做才能正确导出证书和私钥并将它们导入新机器。

Hope it may help you In Keychain, select three items: Your private key, public key and the cert from Apple希望它可以帮助你在钥匙串中,select 三个项目:你的私钥,公钥和来自 Apple 的证书

CMD+Click to select "export 3 items" CMD+点击select“导出3项”

and you will export one.cer file.您将导出 one.cer 文件。 Then double click to import the file without keying any password to protect so.然后双击导入文件,无需键入任何密码来保护。

or you should import cert first and then import both public and private key.或者您应该先导入证书,然后再导入公钥和私钥。 Make sure you also have the Apple Developer Relations Root CA certificate in your keychain.确保您的钥匙串中还有 Apple Developer Relations Root CA 证书。 That is what is used to verify the certificate.那是用来验证证书的。 See in your keychain access whether it has been paired correctly.在您的钥匙串访问权限中查看它是否已正确配对。

With Xcode 5.0+, this has become very simple.使用 Xcode 5.0+,这变得非常简单。
1. On the computer with the developer credentials, Goto Xcode->Preferences->Accounts. 1. 在具有开发人员凭据的计算机上,转到 Xcode->Preferences->Accounts。
Click on the gears to export the profile.单击齿轮以导出配置文件。 Choose a password as it includes all your credentials of apple-developer program.选择一个密码,因为它包含您的苹果开发者程序的所有凭据。
2. Share the exported file with the new computer. 2. 与新计算机共享导出的文件。
3. Import the profile in your Xcode->preferences->Accounts. 3. 在您的 Xcode->preferences->Accounts 中导入配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM