Mac OS X wants to use system keychain when compiling the project

XcodeKeychain

Xcode Problem Overview


I am asked to type in the system admin user name and password when I compile my Xcode project. The whole message is

> Mac OS X wants to make changes. Type an administrator's name and password to allow this. Mac OS X wants to use system keychain.

Does anyone have a solution for this?

Xcode Solutions


Solution 1 - Xcode

  1. Open Keychain Access.
  2. In the top-left corner, unlock the keychain (if it is locked).
  3. Choose the System keychain from the top-left corner.
  4. Find your distribution certificate and click the disclosure triangle.
  5. Double-click ‘Private key’ under your distribution certificate.
  6. In the popup, go to the Access Control tab.
  7. Select ‘Allow all applications to access this item’.
  8. Save the changes.
  9. Close all windows.
  10. Run the application.

Solution 2 - Xcode

The problem is with the Developer Certificate on Keychain which is under "System", on the left hand panel, which is always locked and requiring my password to unlock!

So just move the Developer Certificate to "login", which is always unlocked. Now your problem gets solved.

Solution 3 - Xcode

  1. Open Keychain Access

  2. Click on System in left pane

  3. Unlock the System keychain top left (if it is locked)

  4. Sort the System items by Kind so that the keys are at the top

  5. Look for the private key that keeps asking for password

  6. Double click on it and choose Access Control

  7. Choose "Allow all applications to access this item"

  8. Save changes, lock the System keychain and quit the Keychain app

  9. Restart the application that keeps asking to modify your keychain

Solution 4 - Xcode

I was getting this problem because I had duplicate certificates in my login and System keychains. By opening Keychain Access and deleting all certificates from System that were also in login solved this problem. Hope this helps.

Solution 5 - Xcode

I found that problem to be of provisioning profiles. I deleted all previous provisioning profiles and then reinstalled one I needed.

Solution 6 - Xcode

Move your private key from System to login in keychain access.Then move your developer certificate into login.This worked for me.

Solution 7 - Xcode

In my case I went to Keychain Access, selected "system" in "Keychains" (top left). Then for each item: right click, "Get Info", "Access Control" and added Xcode in "Always allow acces by these applications:" list.

Solution 8 - Xcode

I followed a solution similar to what @krafter did but, instead of giving access to everything in the system keychain, I only needed to give add xcode to the provisioning profile under keychain -> system -> "your provision profile" -> get info -> Access Control then just added xcode. This is what worked for 4.6

Solution 9 - Xcode

Access Control settings no longer appear to save for private keys which are stored in the System keychain, so attempting to add Xcode to the whitelist there did not work for me.

In order to retain Access Control changes, I had to copy the private key + certificate to the Login keychain. This kept Xcode from bothering me when code signing archives for distribution.

Note that Xcode will halt distribution if the certificate's Trust settings are changed (e.g. Always Allow for Code Signing); you must keep these set the System Default.

I hope there is a better solution than this, because this doesn't feel right. But it works for now.

Solution 10 - Xcode

Yes - run XCode with administrator privileges only. It needs administrator rights to perform a whole bunch of tasks, installations, debug sessions and such.

Solution 11 - Xcode

Are you sure it says "Mac OS X" not something developer tools related?

It is normal if Developer Tools wants to enable Developer Mode on your Mac, thus, you don't need to enter an administrator password every time you start debugging your app in the simulator for the every first time after each Xcode launch.

But if you don't have enabled Developer Mode, when it was offered by Xcode, then be prepared, that Xcode will ask for an administrator password for the every first time you launch debugging in the simulator after each Xcode launch.

Solution 12 - Xcode

You need to add your OSx user name to the _developer group. Worked for me.

sudo dscl . append /Groups/_developer GroupMembership <username>

Solution 13 - Xcode

It seems that Xcode not refresh the team selection so selecting it again from the general tab of the targets solved it.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSinghView Question on Stackoverflow
Solution 1 - XcodePVCSView Answer on Stackoverflow
Solution 2 - Xcodesmit shahView Answer on Stackoverflow
Solution 3 - XcodeemotalityView Answer on Stackoverflow
Solution 4 - XcodeJeff AmesView Answer on Stackoverflow
Solution 5 - XcodeSinghView Answer on Stackoverflow
Solution 6 - XcodeDesert RoseView Answer on Stackoverflow
Solution 7 - XcodekrafterView Answer on Stackoverflow
Solution 8 - XcodePirateDaveView Answer on Stackoverflow
Solution 9 - XcodeNathan HosseltonView Answer on Stackoverflow
Solution 10 - XcodeStavashView Answer on Stackoverflow
Solution 11 - XcodeAleksejs MjaliksView Answer on Stackoverflow
Solution 12 - XcodeSarojView Answer on Stackoverflow
Solution 13 - XcodeMoran77View Answer on Stackoverflow