A: 

Did you try rebooting your Mac and your device? Lame answer, but I always try that first.

Nosredna
Ben Reeves
The whole provisioning and keychain thing gives me hives. Hate the process.
Nosredna
I think comments should generally be used for answers like this - otherwise you could add it to almost every question
Casebash
A: 

Looks like a lot people are having the same problems on the official forums as well. It most certainly is a bug that cropped up only recently.

hyn
Should be a comment
Casebash
+5  A: 

Had the same problem yesterday. Now, after signing to the developer portal, for every invalid provisioning profile have a button "Renew". After renewing and downloading updated provisioning profile all seems to work as expected, so problem is definitely solved :)

Valerii Hiora
+1  A: 

This was a bug on the Apple portal site. They were missing a necessary field in the provisioning profile. They fixed this bug late on 6/16/09.

David Smith
I got this error today...
Felixyz
A: 

Hi add the exact same problem and tried everything I found about it on forums but for whatever reason the solution was that all my certificates add migrate in a keychain called "microsoft_intermediate_certificates". In probably happened during xcode upgrade I have absolutely no idea why but it may help somebody. I move all content of the microsoft keychain in login keychain and everything went back to normal

CodeFlakes
A: 

WOWSERS, finally got this pos to work after like 4 seperate trys after incurring the same problem that was originally posted. So here's what happened, not sure if this is is an old issue now (July 9th 2009), but will post anyway in case it is helpful to you. What worked for me... might work for you...

  1. start anew and delete the old private keys, public keys, and certificates in keychain
  2. go through the whole process, request a certificate from a certificate authority, get a new public key, a new private key, and a new certificate. Note: when it worked I had exactly one private key, one public key, and one certificate
  3. Make a new provisioning profile (which utilizes the certificate that you just made) and put that in your organizer window in Xcode. Delete all the old BS.
  4. Run it.

hopefully this helps

A: 

The best answer I got was exporting your key, instead of just trying to import the cert file.

When you export the key from the keychain that generated the request, you get a Certificates.p12 file, which rolls the keys you need together.

Then import this into the new computer.

With keys like this, it's probably good to keep a rolled, certificate package file, because many times the "public" key, or cert file, is not enough to restore things from.

A A
Hey, this one worked for me! Thanks!
Kevin Beimers
+10  A: 

What I found was that I needed to drag the distribution_identity.cer file that I downloaded from the "Certificates -> Distribution" page on the developer program portal into the keychain access program, then this error went away.

Mo DeJong
I had a similar fix which worked for me. Instead of Certificates -> Distribution, I downloaded the cert from Certificates -> Development. Running Xcode 3.2.1.
Sam
This worked for me - thanks Mo!
Nic Wise
This worked for me as well
Bloudermilk
That is what you are supposed to do (: The problem here is what happens when this doesn't work.
corydoras
Worked for me also!
Jamie Chapman
Similar. My public and private key's were not paired until I downloaded both the development and distrobution certs and doubled clicked them to open in keychain. This fixed the problem.
robr
+1  A: 

In my case, I copied the project from my iMac to my Macbook Pro and found out I didn't have my private key installed on the Macbook. So I exported my private key, copied and installed it to the Macbook, and voila it works! I've documented the information here: http://www.creatistblog.com/2009/09/iphone-developer-provisioning.html

A: 

I had this same problem but, it was due to my setting up "FileVault" on my Mac. I went into my keychain and set "login" to be my default and that fixed it.

Lou
@Lou, that sound I face the problem the same to your before.... once before I stting up 'FileValut' , then I find the problem : all provision profile shows 'A valid signing identity matching this profile could not be found in your keychain'..... I try to fixed, but so far I have not solved it ... can you give me more detail tip on this ? How to update the keychain ? thanks for your help in advance..
Robin
+1  A: 

I got it working after re-doing everything and then creating an empty project with XCode and building/running it to the device. XCode showed a window asking something like: Do you want to accept the developer certificate. I pressed "Always". Only after this step I got rid of the message "A valid signing identity matching this profile could not be found in your keychain" in Organizer.

Pompair
A: 

Hey guys, I had heaps of trouble with this yesterday. I went through the whole process a few times, requesting a new certificate request from the authority with the assistant, clearing out everything in the portal, uploading the certificate, creating a new profile and downloading everything. No dice.

However, check this out.

First up clear out all the certificates on the portal to start fresh.

After creating the new certificate request with the assistant, press "Show in Finder", and double click that bad boy. You should get a popup for the Certificate Assistant with a screen showing "Please specify the issuing Certificate Authority", etc. If you don't, just close it and double click again. Now just proceed through the dialog choosing "Request a certificate from an existing CA" - Continue Request is "Saved to disk" - Continue Save it where ever you like, even override the file.

At the end you should see the magic "Creating key pair"

Run over to the KeyChain access and you'll see your keys in there! Upload this certificate to the apple portal and then go through their wizard as normal, everything should work great now.

Donald Buchanan
A: 

you need to create new private key from keychain access and upload that to iPhone developer program portal (by revoking old cert) and creating new one and activate all developer (just developer) profiles on new cert.

hasnat
A: 

There are two different certificates for two different provisioning profiles (development and distribution). You have to install BOTH certificates in keychain. In the iPhone Developer Program Portal:

Certificates -> Development -> Download Certificates -> Distribution -> Download

Double click both certificates. After that both certificates must appear in Keychain.

Freeman
+20  A: 

I had the same problem: I first downloaded my certs to my small MacBook while on the run. When trying to install the certs on my iMac... then I ran into the problems described on this page.

After spending hours pulling my hair out like many of you, I performed the following steps to fix it:

  1. Close all your stuff except your webpage that should be logged into App Dev center.

  2. open xcode click WINDOW > ORGANIZER > select "Provisioning Profiles" on left that should bring up your provisioning profiles. Highlight one by one (if more than 1), right click and delete profile. Yes just do it! Delete them all! (I kept making new one after new one trying to make the thing work)

  3. From the first page you see after logging into the App Dev Center on the right side click iPHONE PROVISIONING PORTAL > (do not "launch assistant") instead click on the left side select CERTIFICATES > you will probably have just one line listed with your name/company - from there click on the right side REVOKE - click OK to verify that's what you want to do.

  4. On the same page click DEVICES > click the box next to your device you are trying to provision and click REMOVE SELECTED > again click OK to verify.

  5. Wait about 2 minutes to let Apple do their thing.

  6. Click "iPhone Provising Portal" header (just under "@ Developer") this will take you the the home page of the developer program portal.

  7. Click "Launch Assistant"

  8. CREATE A NEW APP ID - call it whatever you want.. just make sure it's unique enough to know thats the one you just created because the others you've been messing with all day will not be deleted from Apples Dev Center.

  9. You should be able to follow the rest of the assistant without troubles -- the main thing is you just had to delete your old provision profiles and start over.

Good Luck!

Louie
i tried various "less destructive" approaches to getting my profiles setup again on my mac after a hd ssd resintall, and this is the only one that worked! kudos!
Brad Parks
+3  A: 

For me it only worked when the certificate and both keys were in the Login keychain. I had created a Development keychain before, but the Xcode Organizer wouldn't find the keys in there. So I moved them back to Login, quit the keychain tool - and voila, the error in Xcode Organizer went away! This was on Snow Leopard 10.6.2 with the 3.1.3 SDK.

Karsten Silz
I had revoked everything, deleted everything and followed the instructions to the letter. There was still no "private key" generated under, neither my development or distribution, certificate.Dragging Apple Worldwide developer certificate, development and distribution certificate from my personal keychain to the "login" keychain resulted in the private keys being generated immediately. Thanks Karsten:)
RickiG
+8  A: 

I encountered the same issue. This is because the private key of the certificate does not existing on your machine.

  1. If you are now using a new machine and download the certificate from website: You can export the certificate from the old machine and then import on the new machine.

  2. If you share the developer account with someone: You ask the account owner to send you an invitation and become a team member of that account. Then you can create your own certificate from scratch.

  3. If you don't want to handle all these shit: Just revoke the certificate on website and delete the copy on your local machine. Then request a new one. This should be the ultimate way for solving such issue.

Hope that helps.

Rome Lee
Eonil
My pleasure:)..
Rome Lee
#1! thanks a lot.
Bryan
+7  A: 

I solved it by

a) go to provisioning profile page on the portal

b) Click on Edit on the provisioning profile you are having trouble (right hand side).

c) Check the Appropriate Certificate box (not checked by default) and select the correct App ID (my old one was expired)

d) Download and use the new provisioning profile. Delete the old one(s).

Apparently there are 4 different causes of this problem:

  1. Your Keychain is missing the private key associated with your iPhone Developer or iPhone Distribution certificate.
  2. Your Keychain is missing the Apple Worldwide Developer Relations Intermediate Certificate.
  3. Your certificate was revoked or has expired.
  4. Online Certificate Status Protocol (OCSP) or Certificate Revocation List (CRL) are turned on in Keychain Access preferences

.

prasad
For the benefit of others: this problem will manifest when your developer certificate expires and you generate a new one. Since it's new (not renewed), it does not appear on any of the provisioning profiles. You must go into each provisioning profile, select the new developer certificate and regenerate. Download and install these new provisioning profiles and you'll be good to go.
Steve Madsen
A: 

What you need:

1) A private and a public key.

They have this symbol in your keychain:

alt text

2) A certificate made from the signing request of those keys

3) A provisioning profile linked to that certificate

Let's say you change computers and want to set up Xcode with provisioning profiles again. How do you do it?

  1. Open Xcode, press ctrl + O to open the Organizer, and delete all provisioning profiles you might have installed already.
  2. Open keychain access, and create a signing request which you save to file (when you create the request, a private and public key is created in your keychain).
  3. Create/Update a certificate in the provisioning portal by sending apple this signing request
  4. Download and install the newly created certificate.
  5. Revoke your provisioning profiles and update them with the new certificate.
  6. Download and install the newly updated provisioning profiles.
quano
A: 

For development certificates you can just create a new one and match it to a profile. However for distribution, like when your gonna submit to apple, you cannot do this and must use the distribution certificate the team agent created. The problem is you need the private key on your machine, its very simple however for the team agent who created the certificate to copy the private key to you, below are the instructions from apple, hope this helps.

It is critical that you save your private key somewhere safe in the event that you need to develop on multiple computers or decide to reinstall your system OS. Without your private key, you will be unable to sign binaries in Xcode and test your application on any Apple device. When a CSR is generated, the Keychain Access application creates a private key on your login keychain. This private key is tied to your user account and cannot be reproduced if lost due to an OS reinstall. If you plan to do development and testing on multiple systems, you will need to import your private key onto all of the systems you’ll be doing work on.

  1. To export your private key and certificate for safe-keeping and for enabling development on multiple systems, open up the Keychain Access Application and select the ‘Keys’ category.
  2. Control-Click on the private key associated with your iPhone Development Certificate and click ‘Export Items’ in the menu. The private key is identified by the iPhone Developer: public certificate that is paired with it.
  3. Save your key in the Personal Information Exchange (.p12) file format.
  4. You will be prompted to create a password which is used when you attempt to import this key on another computer.
  5. You can now transfer this .p12 file between systems. Double-click on the .p12 to install it on a system. You will be prompted for the password you entered in Step 4.
marchinram
+3  A: 

After carefully going through the thread here and checking all the solutions proposed by people. I can confidently claim , after following the steps mentioned at apple developer account for creating CSR and mobile provision file.

Just do this ! Launch xcode . Select window->Oragnizer Click this refresh button and that filthy yellow bar will remove instantly.

Trust me , you just have to do this only, no need to repeat the process again & again to make sure that you doing it the right way. Just Press Refresh , enter your login credentials and its done. Taimur

T. A.
A: 

Please checkout the following link. This is very helpful, i hope this can save your life, most probably you are missing some step.

http://mobiforge.com/developing/story/deploying-iphone-apps-real-devices

itsaboutcode