Reputation:
I'm trying to add iOS Distribution and iOS Development certificates to another mac, but after downloading and installing I get the error missing private key. How to fix it?
Upvotes: 7
Views: 20410
Reputation: 3246
It seems like the private key somehow ends up on the computer of whoever created the certificate. The only way I could get the private key was to open Xcode and go to Xcode -> Settings... -> Accounts -> Manage Certificates... and ctrl+click on the iOS Distribution certificate and Export Certificate. This exported a .p12 file that seems to contain the certificate and private key.
Upvotes: 0
Reputation: 21
I fix it deleting the certified from http://developer.apple.com and create a new one since manage certifies on xCode
Upvotes: 2
Reputation: 471
Make sure you are not copying only the public key (.cer).
You should export the private key (.p12) through the Keychain Access.app from the old mac:
This file is what you should copy to the new mac, where you will need to import it (using the password). You should be able to use the provisioning profiles when the certificate is installed on the Keychain Access.app
Upvotes: 7
Reputation: 2269
You need to export the private keys from the system from which they were created (the system whose CSR was used to created the certificates). Without private keys you the certificates do not work.
Upvotes: 3