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条回答
Root(大扎)
2楼-- · 2020-05-11 11:05

If you are using the certificate in a new computer or not. The easiest thing to do would be to revoke the previous certificate relating to the project. Then re-upload to the store. Xcode will generate a new one.

查看更多
聊天终结者
3楼-- · 2020-05-11 11:11

People's answer here about having the key from the computer is generated are accurate. But if things are still failing, try restarting Xcode after installing a cert

查看更多
男人必须洒脱
4楼-- · 2020-05-11 11:12

EDIT: I thought that the other computer is dead so I'm fixing my answer:

You should export the certificate from the first computer with it's private key and import it in the new computer.

I prefer the iCloud way, backup to iCloud and get it in the new computer.

If you can't do it with some reason, you can revoke the certificate in Apple developers site, then let Xcode to create a new one for you, it'll also create a fresh new private key and store it in your Keychain, just be sure to back it up in your preferred way

查看更多
5楼-- · 2020-05-11 11:12

revoke all distribution certificate for developer.apple.com and the validate your app in Xcode there will be the option to create a new distribution certificate after you can export key for further use.

This work for me.

查看更多
\"骚年 ilove
6楼-- · 2020-05-11 11:13

Just for anyone else who goes through this, the answers above are correct but it can still be a bit confusing especially if you have multiple certificates. These were the steps that I took:

1) First take note of the date in the actual distribution certificate that is missing it's private key. Then go to the keychain application on the other computer and type IOS in the search bar. It will show all of your IOS Developer and Distribution keys so you have to find the right one.

2) Click the right arrow of each IOS Distribution entry to reveal the certificate and find the one with the correct date and export that one by right clicking and selection export.

3) Then just import it in the keychain of the new computer and at least with XCode 9.3 it immediately recognizes it and corrects the error so you can now upload your achieve.

查看更多
登录 后发表回答