Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 -reinstalls keychain certs that I delete

I am getting this error:

CodeSign error: Certificate identity 'iPhone Developer: XXX' appears more than once in the keychain. The codesign tool requires there only be one.

At first I though, no worries, I will just go into keychain and delete the duplicate (older) one, which I did. I went back, closed Xcode, reopened Xcode and project, same error. wtf I though to myself. Back into keychain and the cert is there again. I delete both certs, repeat, and notice as the project loads, the two certs I deleted pop back into the keychain.

After much searching, I ensured I did not have the cert in the system keychain, which I did not. Also did a clean and rebuild. When I had duplicates with Xcode 3 I could just clean up the keychain duplicate and I was good. But with Xcode 4 it literally just reinstalls them somehow when I open the project. I even deleted all .cer files on my system that it might possibly be pulling them from.

Any suggestions?

like image 940
Codezy Avatar asked Mar 10 '11 19:03

Codezy


People also ask

Can I delete keychain certificates?

Instructions for AndroidOpen the Settings application, and select the Security option. Navigate to the Trusted Credentials. Tap on the certificate that you would like to delete. Tap Disable.

What happens if I delete certificates on Mac?

Accidentally deleting certificates will result in having to re-enter your credentials for the wireless network or authentication service. Information in this article applies to Mac OS X 10.8 Mountain Lion. It may vary slightly or significantly with other versions or products.


2 Answers

The solution was to go into organizer - under library - provisioning profiles, delete all of them and then reinstall any profiles I still needed.

like image 127
Codezy Avatar answered Oct 21 '22 09:10

Codezy


I had this same problem and the solutions above did not solve my problem (well nearly).

I had the same duplicate developer ID/certificate that everyone is complaining about, and I tried deleting all my profiles, revoking/reissuing my cert, making sure there were none in the system keychain, restarting, etc etc.

In the end it turned out there was a certificate in the system keychain, one that had expired and so was hidden by default in the list.

Make sure you can see expired certificates in KeyChain

To do this:

  1. Open Keychain Access
  2. Click View menu
  3. Click Show Expired Certificates
  4. then look for, and delete expired developer certs
like image 43
Jagu Avatar answered Oct 21 '22 11:10

Jagu