Codesign error: Certificate identity appearing twice

前端 未结 15 2163
孤城傲影
孤城傲影 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:42

    I just spent a fair amount of time struggling with this same issue. After all the attempts to fix it, I finally came to realize that it's a bug in Xcode. This post gave me a clue to fix it: certificates magically re appearing in your keychain

    In my case, the matching private key was in the System keychain, and just had my name on it (hard to tell it was for provisioning). I had to:

    • Move the associated private key to 'login' keychain
    • Restarted Xcode and noticed that the private key was now showing as associated (confirms what it was for)
    • Delete the cert and private key
    • Restart Xcode and poof! It stopped adding my old cert

    An interesting observation is that when you delete the certificate, it doesn't delete the associated private key. Visually, it shows the private key below the cert. Don't be fooled.

    Good luck!

提交回复
热议问题