Xcode could not find a valid private-key certificate pair for this profile in your keychain

The best thing you can do is delete the certificates from your Keychain and get them back so XCode 4’s Organizer stops being “confused”. I’ve compiled it in 7 “easy” steps:

  1. Delete your Certificates: Open the Application called Keychain Access on your Mac (You can hit the keys command + space bar on your keyboard to bring Spotlight and type Keychain Access to launch it). Then select login on the upper left list and Certificates on the lower left list, you will delete only the Certificates starting with the words “iPhone Developer” or “iPhone Distribution”.

  2. You need to revoke the old certificates by logging into your Apple iOS Developer’s account and going to the Provisioning Portal and then to the Certificates option on the left menu. Then locate your Developer Certificate and click on the link located at the right that reads “Revoke”.

  3. Go back to the Keychain Access Application on you Mac, click on the menu bar the following menus: “Keychain Access” -> “Certificate Assistant” -> “Request a Certificate from a Certificate Authority”. Just enter you email if needed and modify the option that says “Request is:” selecting the option “save to disk”… a dialog will ask you where do you want to save a CSR file which is normally called “CertificateSigningRequest.certSigningRequest“.

  4. Go back to the online Provision Portal and create a new Certificate uploading the file you just generated on the same option where your old Certificates were before.

  5. After a minute or so… you will see under the Certificates list that you can now Download you new certificate and that you can also download a WWDR intermediate certificate (See the links under the certificate list). Download them and give them to your Keychain Access by double-clicking them.

  6. You will have to go to the Provisioning Portal menu option called Provisioning where you will see all your App’s Development Provisioning Profiles. You will have to click the link “Edit”->”Modify” at the right and verify that the Certificate is checked.

  7. Finally, just close “XCode 4”. When you re-open it, go to the menu “Window” -> “Organizer”. Because the Organizer reads the certificates from you keychain, they should be there already. Next time you plug your devices just click on Provisioning and make sure the old certificates are gone and the new certificate is on.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)