Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Xcode shows a distribution certificate without its private key

ErrorMissing private key

Short answer

A certificate alone cannot sign code: it needs the private key that was made with it, and that key lives only on the Mac that created the request. If it is gone from your keychain, import the exported identity from the original Mac or from a teammate, or create a new certificate in Xcode.

  • Applies to Xcode 26, macOS 26
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Ask the keychain which signing identities are complete (certificate plus private key). A certificate that Xcode lists but this command does not show has no key here.

    security find-identity -v -p codesigning
  2. 2Match what you see, then jump to its fix

    1. 1Xcode lists the certificate in Manage Certificates, but your keychain has no matching identityThe certificate was created on another Mac or by another team memberFix
    2. 2Nobody holds the identity, and no .p12 existsThe key was lost when the Mac or keychain was reset, and there is no backupFix
    3. 3The certificate shows in Keychain Access without a disclosure triangle (no key under it)Only the certificate came back after a profile refreshFix

What does the error look like?

  • Missing private key
  • Missing private key in the distribution certificate

Cause 1 of 3

The certificate was created on another Mac or by another team member

1Check

Apple says a certificate without its private key cannot be used for signing, and you need the complete identity.

security find-identity -v -p codesigning

2Fix

In Xcode choose Settings > Accounts, select the team, click Manage Certificates, and Control-click the certificate to Email Creator, or export it as a password-protected .p12 on the Mac that has it. Then double-click the .p12 and enter its password to import it into the login keychain.

# on the Mac that has it: Manage Certificates > Control-click > Export Certificate (.p12)

3Verify

The identity is now listed.

security find-identity -v -p codesigning

Confirmed by developer.apple.com

Did this fix it?

Cause 2 of 3

The key was lost when the Mac or keychain was reset, and there is no backup

1Check

Apple's account help tip says that when you are missing a certificate you should create the signing certificate in Xcode, so the private key is installed in your keychain automatically.

security find-identity -v -p codesigning

2Fix

Create a new certificate in Xcode: Manage Certificates, click + and choose the type. Revoke the old certificate in your developer account only when you no longer need it.

# Xcode > Settings > Accounts > Manage Certificates > + > Apple Distribution

3Verify

The new identity is listed, and archiving signs with it.

security find-identity -v -p codesigning

Confirmed by developer.apple.com

Did this fix it?

Cause 3 of 3

Only the certificate came back after a profile refresh

1Check

Apple's older signing note says a profile refresh can restore the certificate to the keychain but not its private key.

security find-identity -v -p codesigning

2Fix

Do not wait for a refresh to repair it. Import the key from a backup or a teammate's .p12, or create a new certificate as above.

# double-click the .p12 and enter its password

3Verify

A disclosure triangle now shows under the certificate in Keychain Access.

security find-identity -v -p codesigning

Confirmed by developer.apple.com

Did this fix it?

How do I stop it coming back?

  • Export the identity as a password-protected .p12 on the day you create it, and store it safely.
  • Let Xcode manage signing where you can, since it shares cloud-managed certificates across the team.
  • Write down which team member created each manual certificate.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Mobile apps

App record creation fails because you lack permission

You cannot add a new app in App Store Connect as a Developer or limited user

Only the Account Holder, an Admin or an App Manager can create an app record, and Apple blocks it until the Account Holder has signed the latest agreement.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.