Xcode keeps asking for password to use the System Keychain

Objective CIosXcode

Objective C Problem Overview


I'm running Xcode 4.3.2, under Lion 10.7.3, but every time I'm installing my iPhone app on the device it keeps asking me for an Admin user name and password.

I've done everything suggested here, and even have reinstalled Xcode:

Another StackOverflow related question

But without success so far.

Here is a picture of the window that is appearing all the time:

Xcode 4.3.2 keeps asking for an Admin user name and password

Any other suggestions on how to solve this problem?

Objective C Solutions


Solution 1 - Objective C

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

Then I moved the Developer Certificate to "login", which is always unlocked, and now everything works perfectly. The annoyance of xCode asking for the password is gone.

Please see this picture for more details: enter image description here

Solution 2 - Objective C

  1. Go to "Keychain Access"
  2. Double click the Private Key under the certificate use to code sign your App
  3. Add "Xcode" to "Always allows these applications:" under the "Access Control" section list.

Solution 3 - Objective C

Here is how I fixed it on Xcode 7.2 (also works in 7.3):

  1. Open KeyChain.
  2. Select System, Choose Certificates category.
  3. Select developer certificate and double click the private key.
  4. Check Access Control and tick on 'Allow all item to access this'.
  5. Restart Xcode and run the app on device.

Solution 4 - Objective C

Hopefully these steps solve your problem.

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

Solution 5 - Objective C

I did follow this to resolve above problem:

  1. Go to Keychain Access

  2. Select System >> Your certificate >> Right click "Get Info"

  3. Certificate information window will open >> Select "Trust" section

  4. From drop down option select "Always Trust"

enter image description here

Solution 6 - Objective C

In my case the required certificate with private key was saved in System keychain, Certificates category. To fix the problem I've exported the certificate (including the private key), and moved it to login keychain, Certificates category.

Solution 7 - Objective C

Note: In my case this answer didn't work. As one of the comments mentions it is a more elegant way, so please try it first if that works.


Try this only if the above doesn't work because I'm not sure if this is the best approach. It works fine for me.

  1. Open Keychain Access App in your MacOS. Next in the left bar, under "System Keychains" click to open "System". Search for your (provisioning profile in my case) "iPhone developer..." certificate in the list and click on the arrow to expand it. Please refer to this screenshot: Keychain Access App in MacOS
  2. Double click the expanded item which opens your private key in a pop-up. Go to Access Control tab and select the option, "Allow all applications to access this item". Please refer to this screenshot: Access control tab of private key for our certificate
  3. Click "Save changes". Enter your credentials- username and password when prompted. Close the popup of private key. Quit Keychain and follow the above steps again to check if the changes have been saved successfully.
  4. Quit Xcode app and open it again. Now when you run your iOS project with this certificate it should not ask for password.

Solution 8 - Objective C

command+c the distribution certificate in the system keychain

command+v in the session login keychain

Solution 9 - Objective C

In my case I just moved to a new Mac. Running an app project in simulator was no problem and also running it on devices worked fine at first. However, when running the project on device the second time, XCode suddenly brought up the following message asking for a key chain password

> Codesign wants to access key "App Development: Some Name (Some > Company)"

Problem was, that neither my Mac password did not work nor any other known password...

After some searching I found the solution: Restart your Mac...!

After the reboot the entry is still in the keychain but it is grayed out and cannot be selected, unlocked or used in any way.

I have no idea what this is about, but know XCode can run the project without any problem again.

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
QuestionneowinstonView Question on Stackoverflow
Solution 1 - Objective CneowinstonView Answer on Stackoverflow
Solution 2 - Objective CzszenView Answer on Stackoverflow
Solution 3 - Objective CAlvin GeorgeView Answer on Stackoverflow
Solution 4 - Objective CMuhammad Naeem ParachaView Answer on Stackoverflow
Solution 5 - Objective CKampaiView Answer on Stackoverflow
Solution 6 - Objective CYuliaView Answer on Stackoverflow
Solution 7 - Objective CDhananjay MView Answer on Stackoverflow
Solution 8 - Objective CrockdaswiftView Answer on Stackoverflow
Solution 9 - Objective CAndrei HerfordView Answer on Stackoverflow