MAS: Code Signing Identity Private Key

2020-02-26 06:48发布

问题:

I've removed all development and installer certificates from the development portal, created a new CSR and generated new Application and Installer certificates.

Now I'm about to distribute the App to the MAS and am constantly presented with this error:

"Name" is a valid identity. However, the private key for the associated package
identity "Name" is not installed on this Mac.

Developer Profiles from a different Mac can be imported.

This puzzles me, since the private key is on the System, how else could I've generated the certificates without them?

回答1:

Double check you have removed all old certs, there is a menu item in the KeyChain app to show all expired certs. I threw away all expired certs and things started working.



回答2:

Got it working:

  • Created a new user account on my Mac
  • Cloned the repo there
  • Removed all Provisioning Profiles and Certificates from the Dev Portal
  • Let Xcode generate all the Certificates for you
  • Upload works!


回答3:

The problem is Mac Installer Distribution certificate.

The easiest way to have everything fixed and loose all the troubles just go to Xcode->Window->Organizer->Devices and then on the lower right corner press on Refresh and log in with your account... xcode will generate and download all the certificates and provisioning profiles needed.



回答4:

I followed the instructions and deleted all expired certificates from the keychain and refreshed the profiles list within the organizer. How ever the error only vanished after I restarted Xcode.