code sign wants to sign using key - Doesn't allow or always allow but deny works

Hi guys,

I'm tearing my hair out with this, i have been exporting my certificate for signing and installing on my new machine many times but since i have updated to El Capitan, i have been having issues. At first, i thought i must be exporting wrong, so i created a brand new certificate from the portal and installed but yet i have the same problem.

The certificate and key exists in the keychain, but then when i build to device, it checks the keychain to authorise the use of the certificate and keychain and all that happens is the alert window appears requesting the "codesign wants to sign using key "x" in your keychain" and the buttons Always Allow, Deny and Allow, when i press Always allow or allow, nothing happens, only deny works.

Whats going??? Surely im not doing something wrong am i?



Thanks

Andrew.

FYI - Snap Z Pro was blocking me from clicking Allow. Kill process if running then delete program.

This was a pretty ridiculous bug to encounter. I was working on setting up OS X Server on a Mac Mini that was located in a server room. I shared the screen of the Mac Mini from my dev machine over a local network. On any popup that had the option to Allow, Deny or Allow Always, I could only click the deny button. Even just hitting enter wouldn't work.


Then when I was trying to "Allow all applications to access this item" on a private key in the system keychain (in the process of exporting my Developer Certificate to the server Mac Mini), it wouldn't let me save changes because of this bug. It would ask for my system password, which I would type in but the save button on the alert was not working.


Finally, after finding this solution, I went into the server room to work on the Mac Mini directly and it now worked. So thanks @gusTeam!

Removing the key and adding it again worked for me.

For everyone that has a fully virtualized Mac Build Environment where connecting a physical mouse is not possible, here is my solution of that problem using command line.


- Get your certificate inclusive private key from a machine with Yosemite as .p12 file (or from your secure corporate certificate storage).

- open a terminal

- execute following command:

"sudo security import <pathToP12> -k login.keychain -t priv -f pkcs12 -A"

- This will install the Certificate and set the Access Control of the private key to allow all Applications. After that no dialog will appear asking to allow usage.

Thanks for this! This method of importing via terminal was exactly what I was looking for.

Can you expand on getting the pathToP12. This issue as ended the usefulness of my build server.

This worked for me. I use MagicPrefs to customize the track pad on the Magic Mouse.

This is definitely the way to go if you don't have access to the server. However you may have to unlock the keychain first before you execute this command.


Is there a reason why you mention Yosemite and not El Capitan?

I'm not a developer. But I had a problem with new cert due to using mouse gestures software...

Thank you for your advice!

Thanks for your comment.


I also use a wacom all day and couldn't decipher why it it wouln't work at all.


Thanks again!

Any solution? I don't have physical access to my Jenkins OSX build nodes (MacStadium)...

For MagicPrefs and others, you have to enable access in the Security > Accessibility area of System Preferences. I tried to add ScreensharingAgent to the list of approved control devices, but it won't let me press "ok" when I have an executable selected, only a ".app" file. Ugh. Anyone know how to make it trust the VNC server?

I am trying this but even using this the key is still set to confirm before allowing access. I really need to get a work around figured out going to the data center to hook up a mouse every time the cert expires is not a option. any ideas?


I also tried -T with he path to the build service.


both -A and -T seem to be ignored teh cert is installed but still asks for for approval

I used the same solution but still I am getting the pop up message.

Same here - watch out for wacom tablet - frustration ahead - until you disconnect

code sign wants to sign using key - Doesn't allow or always allow but deny works
 
 
Q