Code Sign error: Certificate identity 'iPhone Developer: My Name (xxx)' appears more than once in the keychain

Nico AD picture Nico AD · Feb 20, 2012 · Viewed 17.3k times · Source

I m stuck with this error:

Code Sign error: Certificate identity 'iPhone Developer: My Name (xxx)' appears more than once in the keychain. The codesign tool requires there only be one.

I try to renew the build a new CSR, remove the old certificate, build a new one, again and again and again and this error is still present

in the keychain I dont see any duplicated certificate and if I remove the only one I can see in the keychain , Xcode complains that the certificate can't be found ...

Answer

Bobjt picture Bobjt · Feb 24, 2012

Xcode 4.3 now searches all keychains for signing certificates but that is increasing the frequency of the build error:

Certificate identity (x) appears more than once in the keychain...

Apple's steps to resolve it are here: "How do I resolve the CodeSign error: Certificate identity appears more than once in the keychain?"

However, if you are affected by the keychain bug mentioned in the final note of that guide, following is a simpler and preferred solution to problem:

1) Keychain Access > Edit > Keychain List, uncheck "Shared" for the login keychain.

2) next, IF going back into the Keychain List you find the login keychain is still marked as Shared, create a backup of the following files and then remove them if they exist:

/Library/Preferences/com.apple.security-common.plist
~/Library/Preferences/com.apple.security.plist

3) Retry your build.