在密钥链上的分发证书中丢失私钥

时间:2021-06-27 07:33:33

I have the following problem which I could not find a solution for anywhere. Basically, we have a company developer account (not enterprise) and so in order to submit our app, I requested from our team lead to send me the distribution certificate and create and send me a distribution provisioning profile.

我有以下问题,我在任何地方都找不到解决方法。基本上,我们有一个公司开发账户(不是企业),所以为了提交我们的应用程序,我请求我们的团队领导发给我分发证书,并创建并发送给我分发准备概要文件。

With the developer profile everything works good, but when I installed the cert and the prov profile, I did not see the diet profile on xcode, and nor do i have a private key under the dist cert in keychain.

使用开发人员概要文件,一切都运行良好,但是当我安装cert和prov概要文件时,我没有在xcode上看到diet概要文件,在keychain的dist cert下也没有私有密钥。

Does anyone know how to solve this? I read in diff places that I will need to revoke the certificate and create a new one, but I cant really do that since we have a bunch of apps in the company and I cant revoke it for everyone.

有人知道怎么解决这个问题吗?我在不同的地方读到需要撤销证书并创建一个新的证书,但是我不能这么做,因为我们公司有很多应用程序,我不能为每个人撤销它。

Thanks for the help!!!

谢谢你的帮助! ! !

7 个解决方案

#1


80  

在密钥链上的分发证书中丢失私钥Ahh this is a common issue, The solution is simple:

这是一个常见的问题,解决方法很简单:

Who ever created the developer credentials originally needs to go to the keychain on their computer and right click on the key(s) for private and public and export the key to a file. Then you just download that file on your computer and open it, and it will be added to your keychain.

曾经创建过开发人员凭证的人最初需要到他们的计算机上的密钥链上,右击私钥和公共密钥,并将密钥导出到文件中。然后你只要在你的电脑上下载那个文件,然后打开它,它就会被添加到你的钥匙链中。

You need to have both the private key (.pem file) and the certificate for your provisioning profiles.

您需要同时拥有私钥(。pem文件)和配置文件的证书。

#2


37  

As long as you still have access to the mac which was used to generate the original distribution certificate it's a very simple.

只要您仍然可以访问用于生成原始分发证书的mac,它就非常简单。

Just use that mac's keychain Access application to export both the certificate and the private key. select both using shift or command and right click to export to a .p12 file.

只需使用mac的keychain访问应用程序来导出证书和私钥。选择使用shift或command,右键单击以导出到.p12文件。

Attached a screenshot to make it very clear.

附上一个截图,让它非常清楚。

On your mac, import that .p12 file and you are good to go (just make sure you have a valid provisioning profile).

在你的mac上,导入那个.p12文件,你就可以开始了(只要确保你有一个有效的配置文件)。

在密钥链上的分发证书中丢失私钥

#3


33  

To add on to others' answers, if you don't have access to that private key anymore it's fairly simple to get back up and running:

为了补充别人的答案,如果你再也不能使用那个私钥,那么你可以很容易地重新启动并运行:

  1. revoke your active certificate in provisioning portal
  2. 在供应门户中撤销您的活动证书
  3. create new developer certificate (keychain access/.../request for csr...etc.)
  4. 创建新的开发人员证书(keychain access/…)/请求csr…等等)。
  5. download and install new certificate
  6. 下载并安装新的证书
  7. create new provisioning profile for exisiting app id (on provisioning portal)
  8. 为存在的应用程序id创建新的配置文件(在配置门户上)
  9. download and install new provisioning profile and in build settings set the apporopriate code signing identities
  10. 下载并安装新的配置文件,并在构建设置中设置apporopriate代码签名标识

#4


6  

Delete the existing one from KeyChain, get and add the .p12 file to your mac from where the certificate was created.

从KeyChain中删除现有文件,获取并将.p12文件添加到创建证书的mac中。

To get .p12 from source Mac, go to KeyChain, expand the certificate, select both and export 2 items. This will save .p12 file in your location:

要从源Mac获得.p12,请转到KeyChain,展开证书,选择两者并导出2项。这将在您的位置保存.p12文件:

在密钥链上的分发证书中丢失私钥

#5


3  

In my case, I've lost all private keys in my keychain, new one's are imported correctly, but doesn't show the private key as well. The only thing that helped was generating new CertificateSigningRequest

在我的例子中,我丢失了密钥链中的所有私钥,新密钥被正确导入,但是没有显示私钥。唯一有帮助的是生成新的证书激活请求

#6


1  

After you changed a Mac which are not the origin one who created the disitribution certificate, you will missing the private key.Just delete the origin certificate and recreate a new one, that works for me~

当您更改了不是创建disitribution证书的原始Mac后,您将丢失私钥。只需删除原产地证书并重新创建一个新的证书,这对我很有用~

#7


0  

  1. Create new "Developer ID" Certificate from OS X Section.
  2. 从OS X部分创建新的“开发人员ID”证书。
  3. Create new iPhone Certificates
  4. 创建新的iPhone证书

#1


80  

在密钥链上的分发证书中丢失私钥Ahh this is a common issue, The solution is simple:

这是一个常见的问题,解决方法很简单:

Who ever created the developer credentials originally needs to go to the keychain on their computer and right click on the key(s) for private and public and export the key to a file. Then you just download that file on your computer and open it, and it will be added to your keychain.

曾经创建过开发人员凭证的人最初需要到他们的计算机上的密钥链上,右击私钥和公共密钥,并将密钥导出到文件中。然后你只要在你的电脑上下载那个文件,然后打开它,它就会被添加到你的钥匙链中。

You need to have both the private key (.pem file) and the certificate for your provisioning profiles.

您需要同时拥有私钥(。pem文件)和配置文件的证书。

#2


37  

As long as you still have access to the mac which was used to generate the original distribution certificate it's a very simple.

只要您仍然可以访问用于生成原始分发证书的mac,它就非常简单。

Just use that mac's keychain Access application to export both the certificate and the private key. select both using shift or command and right click to export to a .p12 file.

只需使用mac的keychain访问应用程序来导出证书和私钥。选择使用shift或command,右键单击以导出到.p12文件。

Attached a screenshot to make it very clear.

附上一个截图,让它非常清楚。

On your mac, import that .p12 file and you are good to go (just make sure you have a valid provisioning profile).

在你的mac上,导入那个.p12文件,你就可以开始了(只要确保你有一个有效的配置文件)。

在密钥链上的分发证书中丢失私钥

#3


33  

To add on to others' answers, if you don't have access to that private key anymore it's fairly simple to get back up and running:

为了补充别人的答案,如果你再也不能使用那个私钥,那么你可以很容易地重新启动并运行:

  1. revoke your active certificate in provisioning portal
  2. 在供应门户中撤销您的活动证书
  3. create new developer certificate (keychain access/.../request for csr...etc.)
  4. 创建新的开发人员证书(keychain access/…)/请求csr…等等)。
  5. download and install new certificate
  6. 下载并安装新的证书
  7. create new provisioning profile for exisiting app id (on provisioning portal)
  8. 为存在的应用程序id创建新的配置文件(在配置门户上)
  9. download and install new provisioning profile and in build settings set the apporopriate code signing identities
  10. 下载并安装新的配置文件,并在构建设置中设置apporopriate代码签名标识

#4


6  

Delete the existing one from KeyChain, get and add the .p12 file to your mac from where the certificate was created.

从KeyChain中删除现有文件,获取并将.p12文件添加到创建证书的mac中。

To get .p12 from source Mac, go to KeyChain, expand the certificate, select both and export 2 items. This will save .p12 file in your location:

要从源Mac获得.p12,请转到KeyChain,展开证书,选择两者并导出2项。这将在您的位置保存.p12文件:

在密钥链上的分发证书中丢失私钥

#5


3  

In my case, I've lost all private keys in my keychain, new one's are imported correctly, but doesn't show the private key as well. The only thing that helped was generating new CertificateSigningRequest

在我的例子中,我丢失了密钥链中的所有私钥,新密钥被正确导入,但是没有显示私钥。唯一有帮助的是生成新的证书激活请求

#6


1  

After you changed a Mac which are not the origin one who created the disitribution certificate, you will missing the private key.Just delete the origin certificate and recreate a new one, that works for me~

当您更改了不是创建disitribution证书的原始Mac后,您将丢失私钥。只需删除原产地证书并重新创建一个新的证书,这对我很有用~

#7


0  

  1. Create new "Developer ID" Certificate from OS X Section.
  2. 从OS X部分创建新的“开发人员ID”证书。
  3. Create new iPhone Certificates
  4. 创建新的iPhone证书