Xcode shows a distribution certificate without its private key
Missing private keyShort 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.
Fix it fast
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 codesigning2Match what you see, then jump to its fix
- 1
Xcode 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
Nobody holds the identity, and no .p12 existsThe key was lost when the Mac or keychain was reset, and there is no backupFix - 3
The certificate shows in Keychain Access without a disclosure triangle (no key under it)Only the certificate came back after a profile refreshFix
- 1
What does the error look like?
Missing private keyMissing 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 codesigning2Fix
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 codesigningConfirmed by developer.apple.com
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 codesigning2Fix
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 Distribution3Verify
The new identity is listed, and archiving signs with it.
security find-identity -v -p codesigningConfirmed by developer.apple.com
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 codesigning2Fix
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 password3Verify
A disclosure triangle now shows under the certificate in Keychain Access.
security find-identity -v -p codesigningConfirmed by developer.apple.com
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
Xcode says the profile does not include your signing certificate
No unexpired provisioning profiles found that contain any of the keychain's signing certificates
The profile Xcode picked was made for other certificates than the one you sign with.
3 causes, each with a fixMobile apps
Cannot change the App Privacy answers in App Store Connect
Publish Your App Privacy Responses?
Only the Account Holder, Admin and App Manager roles can answer the App Privacy questions.
2 causes, each with a fixMobile 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 fixMobile apps
You cannot find the button to pull your app back from review
No 'remove this version from review' message appears on the version page
There is no button called Reject Binary.
3 causes, each with a fixMobile apps
Your Apple Account cannot sign in to App Store Connect
Sign-in to App Store Connect is refused for an account that should have access
App Store Connect does not open to every Apple Account.
3 causes, each with a fixMobile apps
Apple rejected the app under Guideline 4.3, Design: Spam
Guideline 4.3(b) - Design - Spam
Guideline 4.3 is Apple's duplicate rule.
5 causes, each with a fix