Distribution certificate / private key not install

2020-05-11 10:29发布

Using Xcode 9.1, after building an iOS app, I want to archive it and upload it to the appStore for beta-testing. But I get the following issue after clicking the button Upload to the App Store... and choosing Automatically manage signing:

"My Name" has one iOS Distribution certificate but its private key is not installed.

I do not know why this "private key is not installed", but the Distribution certificate may have been created on a different computer or something. In any case:

What is the simplest way to retrieve the missing private key and install it? In order to make things work.

11条回答
家丑人穷心不美
2楼-- · 2020-05-11 10:47

This answer is for "One Man" Team to solve this problem quickly without reading through too many information about "Team"

Step 1) Go to web browser, open your developer account. Go to Certificates, Identifiers & Profiles. Select Certificates / Production. You will see the certificate that was missing private key listed there. Click Revoke. And follow the instructions to remove this certificate. enter image description here Step 2) That's it! go back to Xcode to Validate you app. It will now ask you to generate a new certificate. Now you happily uploading your apps.

查看更多
叼着烟拽天下
3楼-- · 2020-05-11 10:52

You can only have one distribution certificate. It unites a public key, known to Apple, with a private key, which lives in the keychain of some computer. If this distribution certificate was created on another computer, then the private key is on the keychain of that computer. And this distribution certificate does not work without it.

So to use this distribution certificate on this computer, you must find that computer, open Keychain Access, locate and export the private key, mail it or otherwise get it to this computer, and import it into the keychain of this computer.

If you go into the Accounts pref pane in Xcode and double-click your Team, you'll see a dialog that gives you help with this. If you see your distribution certificate and it says Not In Keychain, you can control-click that certificate to get a menu item that lets you email whoever created the certificate and ask them to send it to you. That person can use this same import to choose Export Certificate and can email you exported certificate.

Either way, the private key or exported certificate will be passworded. You'll need to know the password in order to use it.

查看更多
forever°为你锁心
4楼-- · 2020-05-11 10:52

Add a new Production Certificate here, then download the .cer file and double click it to add it to Keychain.

All will be fine now, don't forget to restart Xcode!!!

查看更多
三岁会撩人
5楼-- · 2020-05-11 10:52
  1. go to this link https://developer.apple.com/account/resources/certificates/list

  2. find certificate name in your alert upload then

  3. Revoke certificate that

  4. if you have certificate you download again
  5. upload testflight again
查看更多
再贱就再见
6楼-- · 2020-05-11 10:56

In my case Xcode was not accessing certificates from the keychain, I followed these steps:

  1. delete certificates from the keychain.
  2. restart the mac.
  3. generate new certificates.
  4. install new certificates.
  5. clean build folder.
  6. build project.
  7. again clean build folder.
  8. archive now. It works That's it.
查看更多
冷血范
7楼-- · 2020-05-11 11:04

Step 1:- xcode -> product -> archives -> Click manage certificate enter image description here

Step 2 :- add ios distribution enter image description here

查看更多
登录 后发表回答