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 requir
Just move the other cer. from "login" to "system" ... and dont delete it... Trust me
Fixed it by Organizer -> Teams (select Your Team) -> Refresh (low right corner).
After moving to a new development mac, I had this problem. I tried deleting the duplicates and checking that there were no hidden expired ones, but the error persisted. The solution that worked for me was to copy the keychain pair from the old mac and imported it in the new mac. The problem was then solved with the following:
For me, I was then able to rebuild the app successfully.
Hope that helps someone :-)
I deleted every certificates and provisioning profiles and restart the system and add it again, it worked.
I had the same problem. I checked every related question I could find on SO and followed the steps - but had no luck. It kept telling me that my distribution cert appeared more than once, but I could see that it only appeared once. I revoked certificates and closed X-Code many times, but it turned out that there was a 'hidden' certificate. I had an older Distribution Certificate that was not in the login keychain. It was in an unnamed keychain. When I deleted that one, it worked! So its worth looking around keychain access thoroughly!
I've had the same issue after updating XCode to 4.3. Deleting certificates and provisioning profiles didn't change anything. There were no duplicates or expired ones anyway.
It turned out the problem was that my private key was in both the session and the system keychains in the keychain access. I just had to remove it from the system keychain and i could build my projects again.