[xcode] Codesign wants to access key "access" in your keychain, I put in my login password but keeps asking me

I'm trying to learn to load apps on my iPhone from Xcode. When I do I keep getting "Codesign wants to access key "access" in your keychain, I put I my login password but it keeps popping up over and over. I've tried my computer login so many times, apple account password, and many others.

enter image description here

This question is related to xcode keychain codesign

The answer is


I have had the same problem. I had more than one Xcode window open, closing all other open windows leaving only the current one open solved the problem for me.


For me XCode had expired my login...XCode-Preferences - saw it had logged me out, loged back in. Only came up with this solution by chance thanks to a related post here that took me to preferences in XCode !


I pressed Deny by mistake and I was stuck, no way to code sign any Pods.

This is how I solved the problem:

  • Open the keychain
  • look for the key com.apple.gs.xcode.auth.com.apple.account.AppleIDAuthentication.token
  • open it
  • click on the Access Control tab
  • at the bottom there's Always allow access for these applications: -> add Xcode in the list
  • Don't forget to press Save Changes

enter image description here


Just click on the certificate in the keychain access and change the access permission if you want to avoid entering password at all, else select Always allow and it will prompt probably 4-5 times and it will be done.


As of August 31, 2018.

Resolving:
 1.  Search Keychain Access
 2.  [KEYCHAIN] Login | [CATEGORY] Passwords
 3.  Look for you email address and double click. <it might not be necessary but just try this>
 4. [ACCESS CONTROL] choose  "allow all application to access this item".
 5. Rebuild to your phone.  If you have error choose a virtual device and build (to reset the build objects).  Then choose to rebuild to your phone again.

2019: I had to enter the password like 40 times... must be a bug... but it worked


I clicked the "Deny" button, and the keychain was off.

I locked the keychain:

enter image description here

And then I entered the login keychain again.


Okay Guys, after literally 2,5 hours of trying to fix that error I managed to find a solution that worked on my two Mac Machines. These are the steps I did:

  1. Open Xcode -> Preferences
  2. Go to the Accounts Tab
  3. Click the button on the bottom right telling 'Manage certificates'
  4. Look for the name of the certificate
  5. Open the keychain manager
  6. Select in the menu the Sign-In tab
  7. Do a right-click and then delete on the certificate that was named in the Xcode settings page before
  8. Go back into Xcode and see Xcode creating a new certificate(The window will be empty for a couple of seconds and then there will a new certificate lighten up.
  9. Rerun your app

I hope that could help you guys. It helped me a lot! :)

Liam


The same dialog asking for the KeyChain password has 3 buttons. Most likely the wanted password is that for logging in to your Mac. If you press "Allow" it only works for some tiny aspect and will ask again, which is very puzzling. You need to press "Always Allow". The verification team at Apple is very weak, they need some 'normal' developers in the design team for the chain of events to get an app in the app store. Normal developers have very sketchy ideas about KeyChains and Certificates and Profiles.


Enter the password you use to open you Mac session and click on "Always allow" until all alerts are closed. The other buttons do not work...


A reboot prevents it from opening the dialog.


Following worked for me!

  1. open keychain-management on your Mac
  2. select "login" on the left pane
  3. look for the key which is causing this issue. Mine was iOS Developer...
  4. double-click the key and select "Allow access to all programs" in the access column

Restart Xcode and try to build again. It will ask you again but with the additional option to "Always allow. Enter your macOS user password as password and press "Always allow".

Let me know if it worked for you.


I encountered this running a brand new project. Neither the Allow or Always Allow button seemed to work, however it wasn't giving me the 'incorrect password' shaking feedback. What was happening was that there were multiple dialog boxes all in the same position, so as I entered a password and clicked Allow nothing changed visually. I ended up having at least 3 dialogs all stacked up on each other, which I only discovered when I tried dragging the dialog. Entering passwords into each of them let my project finish building.


I was also having the problem while running the carthage script in the build phase. (Xcode 9) I get that dialog for each and every framework I had added plus the app itself. You can see a very dark shadow growing. I could bypass it by entering the password every time and hitting "Always Allow".


Enter your login password, and select always allow, to avoid typing in your password multiple times.

codesign access


For me, the problem was caps lock. and it seems it may ask you a couple of times to input your password or you will have to enter a password once and press always allow.


I had the same problem: while building iOS release for Flutter project, was asked for keychain password, entered Apple ID password for developer account, no luck. Finally succeeded by entering password for computer I was using (which was an on-line mac server). Hope that helps.


Solve this problem by doing this.

  1. Enter your Mac Login Password and Choose "Always Allow"

  2. One or More dialogs opened and positioned in the same dialog, repeat step 1 until all dialogs closed. (So you thought your password wrong but repeat "Always Allow" with your Mac login password tricky part :) )

Hope it will work.


Had the same issue. It was fixed after I entered my mac user password and hit Always Allow.


For me, I realized one of the dialogs was opened in another workspace. Once I discovered that and input my password there it went through.


What helped me was to enter the incorrect password. After that, when entereing the correct password, new dialogs started to open in different places of the workspace. I had to enter the correct password about 20 times hitting Always allow. Which helped!


Examples related to xcode

Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Make a VStack fill the width of the screen in SwiftUI error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code

Examples related to keychain

Distribution certificate / private key not installed Codesign wants to access key "access" in your keychain, I put in my login password but keeps asking me This certificate has an invalid issuer Apple Push Services How can I add private key to the distribution certificate? missing private key in the distribution certificate on keychain How to obtain Certificate Signing Request iOS: How to store username/password within an app? Xcode 4 - "Valid signing identity not found" error on provisioning profiles on a new Macintosh install Delete keychain items when an app is uninstalled How to convert SSH keypairs generated using PuTTYgen (Windows) into key-pairs used by ssh-agent and Keychain (Linux)

Examples related to codesign

Codesign wants to access key "access" in your keychain, I put in my login password but keeps asking me command/usr/bin/codesign failed with exit code 1- code sign error missing private key in the distribution certificate on keychain Re-sign IPA (iPhone) Command /usr/bin/codesign failed with exit code 1 Codesign error: Provisioning profile cannot be found after deleting expired profile