Tim Kruger
Tim Kruger

Reputation: 5131

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

Upvotes: 510

Views: 259958

Answers (30)

Vladimir
Vladimir

Reputation: 62

I tried many ways to fix it but only this helped me:

  1. go to Keychain
  2. switch to login tab
  3. remove all items related to your user:
  • com.apple.account.AppleAccount.cloudkit-token
  • com.apple.account.AppleAccount.find-my-friends-app-token
  • com.apple.account.AppleAccount.find-my-iphone-token
  • perhaps you have other ones com.apple.account.AppleAccount.{the_rest_names}

then it worked for me. hope it will work for you as well. But I have specific user for this purposes and just filtered in Keychain using the email -> then deleted all items related to that

Upvotes: 0

SOLVED

In my case there is No always allow, and my machine password doesn't work;

So what Worked For Me:

  1. Xcode -> Product -> Clean build folder : ⇧ ⌘ K
  2. Restart you machine;
  3. Build again: ⌘ B
  4. Now the box will show the Always allow, click it, and you machine password will work;

Done! :D

Upvotes: 0

patrikdu
patrikdu

Reputation: 11

For all who still are suffering. A working solution is to clean all which is in ~/Library/Keychains and than go to Settings/Users and Groups click on your username and change password (the same as before works). After the restart keychain works.

Upvotes: 0

U.Savas
U.Savas

Reputation: 139

2024: Did work only after rebooting the system. So do not try to enter the password 40 times. just reboot.

Upvotes: 0

Ratan Servegar
Ratan Servegar

Reputation: 415

The reason it keeps popping up is because you installed the certificate in the system location, move it to the login location and it will ask you once and enter your password and click on always allow.

Upvotes: 4

Azarnoy
Azarnoy

Reputation: 307

For me there was no password of the system, there was no password at all, just allow with blank password and it works

Upvotes: 4

Antonin GAVREL
Antonin GAVREL

Reputation: 11259

Deny all popups until you have only one popup left (also you have to deny the popups in the reverse orders they were opened)

When only one is left enter user password and always allow.

Can't believe this is happening in 2023.

Upvotes: 6

Swifty Codes
Swifty Codes

Reputation: 1122

I faced this issue recently where I was been asked to enter the Username and Password in the POP UP and where I entered it for like almost 105+ times as in the POP UP there was no "Always Trust" option available. The option in the POP UP were "Deny" & "Allow" only.

So thought to add my thoughts here as none of the above worked for me. Though the solution was a combination of above answers but no one mentioned to add the developer certificate to keychain under the section

System and Login

I had my certificate added under the System option but not under the Login option in the keychain on the Left hadn't side of Keychain Access.

After doing this the issue was not there and I live happily thereafter.

Hope this helps. Happy Coding. Cheer's.

Upvotes: 13

Swifty Codes
Swifty Codes

Reputation: 1122

I was facing the same issue and for me the "Always Allow" option was not coming so I had to enter the username and password again and again and after entering for almost 150+ times, I checked in case the p12 is there or not earlier which I added also but it got removed somehow and I added the p12 again and boom I got the "Always Allow" option also and in a single try it worked. For me this worked like a charm. Try doing this. This error of pop up will go.

Upvotes: 0

Cyrill
Cyrill

Reputation: 166

The popular answers are outdated.

Update 2022: Just press Enter. See also here

Upvotes: 2

Ucdemir
Ucdemir

Reputation: 3098

Here is best solution:

1-)revoke all certificate in your apple developer account

2-)log off your developer account inside xcode

3-)relogin with your developer account

4-)re-create certifiactes...

It will work like charm :)

Upvotes: 0

Permafrost
Permafrost

Reputation: 15

For those that have had no luck with the provided answers:

Try to first turn off any app that might be changing your mouse behaviour (like "Mos", that smooths scrolling) and any bluetooth mice you have connected.

Upvotes: 0

Pigpocket
Pigpocket

Reputation: 458

In my particular case, the dialog box did not have the Always Allow, Allow or Deny options, so I wasn't able to use the above solutions. I had to go to my Keychain Access app, choose the certificate, go to "Access Control" and add Xcode in the apps to Always Allow access. After that, the dialog showed the Always Allow button, which I could use successfully.

Access Control Dialog Box

Upvotes: 3

MBK
MBK

Reputation: 3414

Hope this is a bug, but don't worry you can continue your build without any problem. Like all others I am sharing my experience.

The dialog will pop up again and again, and I thought that I maybe forgot the keychain password.

what you have to do is enter the Mac login password and press Always allow.

if nothing is happening, check the dialog by dragging it with mouse, and move the dialog. you will find same dialog underneath.

try separating all the dialog through out the screen and find the dialog that is working. (ie, maybe only only dialog will accept the password and close. yeah, it may reopen new dialogs anyway. but never mind.)

Continue the password entering and pressing always allow until it give up.

I entered the password around 20 - 30 time I guess. and it worked pretty well.

now thinking that if I press always allow on the first time, maybe it will not come again.

Upvotes: 4

Ramandeep Singh Gosal
Ramandeep Singh Gosal

Reputation: 448

Annoyingly, for me it opened up several boxes, so I had to pay attentions that when I clicked always allow for one box, another box, flickered. So had to add all the passwords and clicks in an ordered fashion according to the mac. then I got it to work.

Upvotes: 0

Nolonar
Nolonar

Reputation: 6132

In my case, I didn't have the 3 buttons described in the other answers ("Allow", "Always Allow", "Deny"). I only had an "OK" button.

I tried entering the following passwords:

  • Login password, the one I use to login to my Mac.
  • Apple ID, the one I use to authorize App Store purchases and login to my iCloud.
  • Apple Developer ID, the one I use to login to App Store Connect.

But none worked.

What did work, strangely, was leaving the password text field empty.

Upvotes: 5

Mohad Hadi
Mohad Hadi

Reputation: 1986

dialogs open on each other some of them should confirm first , if you enter password many times and it dosen't work just drag a dialog and see if there is any other dialogs under it and confirm them. it works for me

Upvotes: 0

Neeraj Dwivedi
Neeraj Dwivedi

Reputation: 158

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.

Upvotes: 1

Sergio Solorzano
Sergio Solorzano

Reputation: 665

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 !

Upvotes: 0

JSON C11
JSON C11

Reputation: 11800

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

codesign access

Upvotes: 24

Dyary
Dyary

Reputation: 810

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.

Upvotes: 1

Liam Schäpers
Liam Schäpers

Reputation: 126

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

Upvotes: 6

Kristian
Kristian

Reputation: 2271

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

Upvotes: 45

user462990
user462990

Reputation: 5532

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.

Upvotes: 9

Фил Макаров
Фил Макаров

Reputation: 11

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!

Upvotes: 1

Fato
Fato

Reputation: 223

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.

Upvotes: 22

FuriousBunny
FuriousBunny

Reputation: 101

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.

Upvotes: 0

magohamote
magohamote

Reputation: 1494

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

Upvotes: 71

toto_tata
toto_tata

Reputation: 15402

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

Upvotes: 16

Eman Jayme
Eman Jayme

Reputation: 240

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.

Upvotes: 3

Related Questions