Codesign error: Certificate identity appearing twice

前端 未结 15 2121
孤城傲影
孤城傲影 2020-12-07 13:04

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

So I

相关标签:
15条回答
  • 2020-12-07 13:34

    I had this problem and read every piece of information about it, finally I've found the solution on my own. What people failed to mention is that BEFORE cleaning the certificates in Xcode organizer and BEFORE cleaning the expired keys in your keychain you need to make sure that you don't have any expired certificates in the Provisioning Portal. If you'll have even one expired certificate for an old app that used the old Developer certificate Xcode will pull that into its organizer with first build and from there it will go to your keychain and will cause a duplicate.

    0 讨论(0)
  • 2020-12-07 13:34

    In my case deleting the certificates didnt work. XCode 4 seems to cache or restore them. The trick that finally worked for me was to have keychain and xcode running. Then in keychain drag my 2 certificates (dev+dist) from 'login' to 'system'. Then the duplicates magically reappeared and i was able to delete them, and then i dragged the certificates back to 'login'

    0 讨论(0)
  • 2020-12-07 13:36

    I think I figured out why the simple delete is not working. Because the dev certificate is still stored in the provision profile, when I close/re-open the Xcode after deleting the certificate in Keychain, I saw the old certificate come back. So I delete it again. It worked.

    The simple delete the profile solution did not work for me.

    Solution that worked in my case:

    1. Quit Xcode
    2. If the Keychain access is open, keep it open.
    3. Launch Xcode now.
    4. See that the certificate Xcode was complaining about will be re-added into the keychain at launch from its cache.
    5. Go ahead and delete it.
    6. Compile and happy coding.
    0 讨论(0)
  • 2020-12-07 13:36

    It's very easy, export the correct Certificate to your desktop. Delete that Certificate in the keychain. Try to build source with error message (have no cert..) Then import again the certificate. => Success!

    0 讨论(0)
  • 2020-12-07 13:38

    I was dealing with same problem once. And I have solved it by removing unused provisioning profile from Organizer tab in xcode. Actually Keychain will get that certificate from this provisioning profile which is either expired certificate or the build by revoked certificate.

    So you just have to delete this provisioning profile from Organizer tab. Organizer is on right-top side button of xcode Open it and than in Organizer remove the provisioning profiles that you don't using.

    Here is the screenshot,

    enter image description here

    And don't forget to remove extra certificate from the keychain but after that those certificate does not appear again.

    0 讨论(0)
  • 2020-12-07 13:39

    I have the same issue with xcode45-DP1. this works for me:

    1. remove all certificates related to your account from keychain. QUIT keychain

    2. remove all provisioning profiles related to your account from xcode:organizer:device:Library:provisioning profiles. QUIT xcode

    3. revoke your certificate and regenerate it and download it to your build machine

    4. before download provisioning profile, click on Edit next to the download button to make sure your name is selected.

    5. Then download the provisioning profile

    6. double click on the certificate to install it onto keychain

    7. drag the provisioning profile to xcode:organizer:device:Library:provisioning profiles

    8. do not click the refresh button from the xcode.

    9. make the build.

    0 讨论(0)
提交回复
热议问题