Xcode keeps asking for password to use the System Keychain
Objective CIosXcodeObjective 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:
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:
Solution 2 - Objective C
- Go to "Keychain Access"
- Double click the Private Key under the certificate use to code sign your App
- 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):
- Open KeyChain.
- Select System, Choose Certificates category.
- Select developer certificate and double click the private key.
- Check Access Control and tick on 'Allow all item to access this'.
- 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:
-
Go to Keychain Access
-
Select System >> Your certificate >> Right click "Get Info"
-
Certificate information window will open >> Select "Trust" section
-
From drop down option select "Always Trust"
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.
- 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:
- 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:
- 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.
- 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.