Alex Rivera | Logout

Xcode 4 -reinstalls keychain certs that I delete

Asked 2011-03-10T19:03:22.423
85

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?

Edit
Report

1 Answer

0

Just installed Xcode 4.6.1 and started having this problem again. The last time was a long time back. I deleted the old provisioning profiles and the certificates, but still could not build.

This time it turns out that I had 2 certificates listed for me in the team account of the developer portal. The first was expired, the second was not. Xcode kept grabbing the first one it found while refreshing (or maybe both).

I deleted both certificates from the keychain, then manually downloaded the good one from Apple's portal and manually added it to the keychain. Now I can build again.

(And I sent a request to the team admin to remove the old certificate.)

answered 2013-04-11T16:33:17.437

Your Answer