106
votes

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?

7
Yes, I've tried that already and it did not work either. Thanks!neowinston
Are you currently signed in with an Admin account?Henry F
Yes, and I've even tried as root, but xCode keeps asking the password.neowinston
Is your computers development mode enabled?Mick MacCallum

7 Answers

210
votes

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

58
votes
  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.
31
votes

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.
15
votes

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.
14
votes

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

2
votes

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.

0
votes

command+c the distribution certificate in the system keychain

command+v in the session login keychain