I need help:
My profile expired and I can't renew it - don't know why. I deleted everything, set up everything new but nothing worked so far… When I double click the certificate, it will put this one into the keychain under ceritficates, but not install the private and the public key.
Error message is: Xcode could not find a valid private-key/certificate pair for this profile in your keychain.
Does anyone know a solution?
Thanks in advance.
The certificate isn't meant to install the public/private keys; they're not included in the certificate. If you've deleted them and not kept a copy around then you'll need to generate a new pair and resubmit to Apple to generate a new certificate.
Related
I've created a Certificate Signing Request (CSR) file using KeyChain on an iMac and MacBook. I have successfully uploaded the CSR file to Apple for generating a Pass Type ID certificate. I can download and install the certificate to the machine the CSR file was generated from.
The problem now is I cannot export the certificate AND the private key because there is no private key associated with the certificate! Very strange considering the CSR file came from this machine.
I have followed the Apple guide and they make no mention to this potentially being a problem so there's no troubleshooting help there.
I do not know what's going wrong here so please shed light on this if you can. Thanks.
Solved
The Common Name had to match the name used in the id.
When I build an app it shows me this error:
When I deleted the previous one certificate, everything starts working fine. So my question is if deleted it once how it again added in the keychain? and why it is added again instead of one certificate being there in the keychain?
I think you are getting an error message about having an extra distribution certificate - because you have an extra distribution certificate!
My guess is that you are getting it pulled back down to your machine from the Provisioning Portal by Xcode.
Have you recently revoked a distribution certificate and then tried to delete from KeychainAccess? If so, did you delete the public and private keys associated with it?
Go into KeychainAccess and check if you have any orphan private keys, if you have any which could be linked to an old distribution certificate then delete them (deleting a developer or distribution certificate without deleting its public and private key is not deleting it properly - you need to delete both keys AND the certificate)
then go back to Xcode and in the Organiser screen hit the 'refresh' button - then check KeychainAccess again - with any luck Xcode will not have downloaded the naughty certificate and your problem has been solved. However if you now have your rogue certificate back then it may be that the provisioning profile you have been using needs to be changed...
BTW, make sure you look in the 'system' and 'system roots' keychains as well as the 'login' keychain.
I am trying transfer my developer certificate under the keychain to someone. I exported the item. And also send him the provisioning profile which includes his device ID.
He installed my certificate to his keychain and also the provisioning profile to his xcode.
However, The provisioning profile under his xcode complains of there's no Valid signing Identity. Well I already sent him the certificate.
What's wrong?
You have to export the matching private key with the Developer Certificate, you can select both the private key and Certificate and export at the same time.
Does he have multiple certificates with the same name in his keychain? In which case he may have to delete the one that is not applicable for this profile when he is trying to build the app (he can reinstall the deleted certificate later). Also, ask him to delete and reinstall the profile. Is there any more information he is getting with the error?
Along with the development & distribution certificates that you provided, you also need to export your private key as a *.p12 file. When he is importing this elements into the Keychain application ensure he selects the "login" keychain.
The error I received on build attempt was:
Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain
Anyone know how to resolve this?
Thanks // :)
Are you a paid up developer ?
Have you created a provisioning profile for your application ?
Have you installed a provisioning profile via the Organizer?
if you have, then you need to go to the KeyChain utility, ensure that Login is the default Keychain, and that iPhone Developer:yournamehere certificate is installed along with the public and private keys of your dev certificate.
if you haven't, then you need to follow the steps in the provisioning utility http://developer.apple.com/iphone/manage/overview/index.action
This took me about 3 hours to figure out but I found that when you send the request for the certificate, if you have multiple profiles on your computer you might have to request it from your name from the keys in KeyChain Access... just doing it from the drop down menu wasn't binding the certificate to the private key...
Sounds stupid simple, but it worked for me:
Restart your Mac
I know, what is this, Windows? But really, I just upgraded xcode 3.2.5 with ios 4.2 and same problem running new xcode. After banging my head around a bit, just restarted my Mac, came back into xcode, and bingo!
Hope its that easy for everyone ;)
I've been able to generate and use my development cert & provision for some time. I did have some problems after upgrading xcode, in that the login certs where getting trashed/removed, but I fixed that.
I'm trying to create my distribution cert & provision. I've noticed that the distribution cert doesn't have a private key - you can't expand the cert when clicking on it. Not sure if that's an issue or not. When I drag the distribution profile into Organizer, it comes up with the error message, "A valid signing identity matching this profile could not be found in your keychain".
I've tried putting the distribution cert in both login and system. I also DO have the WWDRCA cert installed.
Any ideas - A real pain ...
It sounds like you do not have the keys corresponding to the certificates in your keychain. If you posted screenshots of your keychain entries and your code signing configuration, it would be easier to see exactly what is going on.
Also make sure you have the Apple certificate in your keychain.
Check if you have still got your private key on login keychain. That's what happens to me. I encountered this same problem when I copied my project from iMac to Macbook Pro. I 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 it fixed it!
I've documented the information here: http://www.creatistblog.com/2009/09/iphone-developer-provisioning.html