Xcode:如何导出开发人员配置文件以便将其导入另一台 Mac [英] Xcode: How to export a developer profile in order to import it on another Mac

查看:25
本文介绍了Xcode:如何导出开发人员配置文件以便将其导入另一台 Mac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从旧 Mac 导出我的开发人员配置文件并将其导入另一台 Mac,因为我收到以下错误:

I need to export my developer profile from my old Mac and import it on another Mac because I'm getting the following error:

您的帐户已有有效的 iOS 开发证书

Your account already has a valid iOS Development certificate

我发现我可以从这里导出它:

I found out that I can export it from here:

但是在我的 Mac 上,我有 2 个帐户,如果我单击导出帐户,我是否同时导出它们?因为我只需要一个账号.还有其他解决方案吗?像导出用于签署iOS开发证书的私钥并在新Mac上导入?

But on my mac I have 2 accounts there, if I click export accounts do I export both of them? Because I just need one account. Is there any other solution? Like exporting the private key used to sign the iOS Development certificate and import it on the new Mac?

推荐答案

我建议不要使用 Xcode 的导出选项,而是进入您的 Keychain Access.app,并手动复制密钥/证书.

I'd recommend not using Xcode's export option, but instead to go into your Keychain Access.app, and copy the key/cert manually.

为此,在钥匙串访问中,创建一个新的钥匙串(默认情况下,它将存储在 ~/Library/Keychains 中).选择您的 login 钥匙串,然后选择 Category 下的 My Certificates.您现在应该在右侧面板中看到您的证书.它的左侧应该有一个披露箭头,切换时应该会显示您的私钥.选择证书,然后将其复制/粘贴到您的新钥匙串中(不要拖动它,否则会将其从您的 login 钥匙串中删除).

To do so, in Keychain Access, create a new keychain (by default it will be stored in ~/Library/Keychains). Select your login keychain, and then My Certificates under Category. You should now see your certificate in the right panel. It should have a disclosure arrow on the left side, and toggling that should show you your private key. Select the certificate, and copy/paste it into your new keychain (don't drag it, or it will remove it from your login keychain).

现在您可以将该钥匙串复制到您的新计算机,在 Keychain Access.app 中打开它并将密钥/证书复制到您的 login 钥匙串那里.

Now you can copy that keychain to your new computer, open it in Keychain Access.app and copy the key/cert to your login keychain there.

我不建议为此使用 Xcode 的原因正是您提到的,它导出所有帐户.过去,我曾有客户向我发送以这种方式导出的他们的开发人员密钥/证书",其中包括他们公司中数十名其他开发人员的密钥/证书.

And the reason I don't recommend using Xcode for this, is exactly what you mention, that it exports all accounts. I've had clients in the past send me 'their developer key/cert' exported in this manner, that included the key/cert for dozens of other developers in their company.

这篇关于Xcode:如何导出开发人员配置文件以便将其导入另一台 Mac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆