Missing private key iphone developer in keychain

60.2k Views Asked by At

I'm trying to run an application on my iPhone, but I'm having problems with the code signing identity. Actually I have two certificate in my keychains, one for the distribution, and one for developing that does not have the private key. I tried to download again the certificate from developer.apple.com but I still can't have the private key. In fact I can't select the iPhone developer profile from Target -> Build settings -> Code signing Identity because I get the error:

Profile doesn't match any valid certificate/private key pair in your keychains.

Moreover in the organizer the status of the developer profile is:

Valid signing identity not found.

Do you have any suggestion?

5

There are 5 best solutions below

5
Hetal Vora On

If you had an older machine where you had created a CSR and downloaded the certificate originally, then export the certificate from its keychain. Save it as a .p12 file and then copy it to your new machine on which you are working currently. Double click the .p12 file to install it to your keychain. Expand and see if you see the private key.

If this is the original machine and you still do not have a private key in your keychain, you would have to request for a new certificate.

0
Kripa Jayakumar On

This happened to me too recently. No proper reason as to why it did happen. I had tried revoking the certificate as well. But no help. So I created a new certificate.

This might help http://seventhsoulmountain.blogspot.com/2013/09/ios-code-sign-in-complete-walkthrough.html

0
Jason FB On

We identified in our case that we were exporting the WRONG certificate, because Keychain Access has a UX deficiency in that when you use the search box, you don't see certificates with a name matching what you searched for, you see certificates tied to PRIVATE KEYS with a name that matches what you searched for.

Because of this confusing UX of Keychain access, we were continually exporting the wrong certificate (but had convinced ourselves it was right because the name matched). Once we identified it as the right certificate, our import problem & signing identity missing private keys messages went away

see Can't import Code-signing Public or Private keys using Keychain access (Mac OS X Mavericks) for complete notes.

0
Ruchira Randana On

If you don't have your private key in your keychain or stored anywhere else, then you cannot sign an app. There is no point in downloading the developer certificate from Apple. Your private key is NEVER sent to Apple at any point in the process. Only your public key is sent.

The private key & public key PAIR is created when you create a Certificate Signing Request using keychain. This is exactly what you need to do if you have lost your private key.

0
Natasha On
Profile doesn't match any valid certificate/private key pair in your keychains.

This particular error can occur for couple of reasons, but the most commons are -

  1. The certificate you have installed in your keychain is not the one with which you created your provisioning profile, Remember, you had to select a certificate when you created the profile?

  2. The certificate that you used to create the provisioning profile is either revoked or expired.