Keychain issues after installing backup on new Mac

After using backup to setup my new Mac Mini my xCode App projects run ok in the Simulator but fail to Archive or Analyze with the error: "The specified item could not be found in the keychain." The item is a provisioning profile.

I was able to Run, Archive and Validate these projects on my old Mac Mini just before the final backup. Are there known problems in backup of provisioning profiles or keychains?

I have tried creating new profiles etc without success for several days. I'm not an expert developer so I'm hoping there is a simple solution.

Please suggest the best way to resolve and/or clarify this problem.

Answered by jmb2013 in 817644022

Interim solution - I was able to Archive my project on my wife's Mac Air (which I had last used 2-3 years ago) and then upload the build for App Store approval from my new Mac Mini.

I am also trying to recover my private key from a Time Machine backup of my old Mac and then import it to my new Mac

I recommend the post The Care and Feeding of Developer ID - https://developer.apple.com/forums/thread/732320

Apparently developers should save Keychain info in addition to using Backup to setup a new Mac. I did not! So I created new Developer and Distribution certificates and they show in Keychain Access. I use xCode automatic signing but I still get the ".. could not be found in the keychain" error.

Suggestions to resolve this would be much appreciated!

This problem seems to be related to posts about Keychain Access showing certificates under the Certificates tab but not showing any under My Certificates because the Private Key is missing.

I don't have the original Private Key or .p12 files from my old computer.

I created new Certificates but they still don't show in My Certificates. The login keychain is unlocked but Archive still fails when trying to sign the build! Old projects build OK but they also fail when I attempt to archive them.

Hoping someone has the key (pun intended) to solve this!

I reset the Keychain and removed existing certificates and profiles so I can use xCode automatic signing. However, I am still stuck on this problem: missing keychain item and unable to create an archive.

Please help!

Still no luck, and now I'm getting a "No Certificates Available" message when I try to create a provisioning profile.

When I check the status of my account and select team I see "missing private key". Apparently it did not transfer over to my new Mac from my old Mac. R

Resetting the Key Chain and revoking old certificates did not seem to help. There should be a simple solution for anyone that transfers development files to a new computer.

Try this:

  1. Create a new project for your target platform using one of Xcode’s built-in templates. For example, if you’re targeting iOS, use the iOS > App template.

  2. In Signing & Capabilities, makes sure that “Automatically manage signing” is set.

  3. And that the correct team is selected in the Team popup.

IMPORTANT Make sure that this is your paid team. If you’re also using Personal Team, it’s best to ignore that at this stage because it has non-standard restrictions.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thank you for the reply!

I verified that Automatic signing is set. I am the one-man team as Computerade Products and the popup image is attached below -showing missing private key - although the certificates appear to be new (i.e. created on my new Mac).

My Test-App project Run is OK but Archive gives the same message that started this post. I'm on xCode 16.1.

CodeSign /Users/michaelbirch/Library/Developer/Xcode/DerivedData/Test_App-apijkfdxvfxogbdgkozhfjnvbifn/Build/Intermediates.noindex/ArchiveIntermediates/Test\ App/InstallationBuildProductsLocation/Applications/Test\ App.app (in target 'Test App' from project 'Test App') cd /Volumes/GAGA\ HDD/Gaga\ Home/SwiftUI\ Projects/Test\ App

Signing Identity:     "Apple Development: Michael Birch (9KD5TCGGHG)"
Provisioning Profile: "iOS Team Provisioning Profile: *"
                      (37ed6a51-3784-499b-a588-26bed42acfc6)

/usr/bin/codesign --force --sign 15E4CD69B95A3AF856ADEE7574C15D70EFF3B535 --entitlements /Users/michaelbirch/Library/Developer/Xcode/DerivedData/Test_App-apijkfdxvfxogbdgkozhfjnvbifn/Build/Intermediates.noindex/ArchiveIntermediates/Test\ App/IntermediateBuildFilesPath/Test\ App.build/Release-iphoneos/Test\ App.build/Test\ App.app.xcent --generate-entitlement-der /Users/michaelbirch/Library/Developer/Xcode/DerivedData/Test_App-apijkfdxvfxogbdgkozhfjnvbifn/Build/Intermediates.noindex/ArchiveIntermediates/Test\ App/InstallationBuildProductsLocation/Applications/Test\ App.app

error: The specified item could not be found in the keychain.

Resetting the Key Chain and revoking old certificates did not seem to help. There should be a simple solution for anyone that transfers development files to a new computer.

To transfer your signing identity, see the "Export your signing identity to share with a team member" and "Recover a missing private key from another team member" sections in Synchronizing your code signing identities with Apple Developer Portal.

The suggested links require saved private keys from my old computer. I don't have them. I assumed that transferring my backup to my new computer included the keys.

I have used Key Chain Access to reset everything. I can see my Apps in Connect including Certificates, Identifiers and Profiles. Revoking old Certificates and recreating them isn't helping.

Can my private key (signing identity) be recovered from my account. If not, what other options are available so that I can sign and Archive my Builds.

Accepted Answer

Interim solution - I was able to Archive my project on my wife's Mac Air (which I had last used 2-3 years ago) and then upload the build for App Store approval from my new Mac Mini.

I am also trying to recover my private key from a Time Machine backup of my old Mac and then import it to my new Mac

I recommend the post The Care and Feeding of Developer ID - https://developer.apple.com/forums/thread/732320

Keychain issues after installing backup on new Mac
 
 
Q