GPG Keychain Access: Generate new key failed! Code = 85

Isaac Hodes's Avatar

Isaac Hodes

01 May, 2012 10:26 PM

New install of GPG Keychain Access on OS X 10.7 On attempting to generate a new key, I get the error "Generate new key failed! Code = 85".

Version of GPG Keychain Access: Version 1.0b7 (1.0b7)
Version OS X: 10.7.3
Version of gnupg2: gnupg2-2.0.19

I was wondering if anyone had any suggestions for what to do? Please let me know if I can provide any more information/or a better repro/whatever.

  1. 1 Posted by cfraire on 03 May, 2012 02:04 PM

    cfraire's Avatar

    I see in the GPGException list: GPGErrorNoPINEntry = 85

    Perhaps there was a problem at the stage where you entered and re-entered your password (PIN)? Would you please re-try and describe anything unusual where PIN entry is concerned?

  2. 2 Posted by Isaac Hodes on 03 May, 2012 04:25 PM

    Isaac Hodes's Avatar

    This is how I get the problem to occur:

    Click the "New" icon (with the key on it)
    Click "Generate Key"
    it begins generating, and then I get the error. I don't see a place to enter a pin—perhaps I'm missing something very obvious?

  3. 3 Posted by cfraire on 03 May, 2012 04:57 PM

    cfraire's Avatar

    There should immediately pop up a window titled "Pinentry Mac." You're running gnupg2, not MacGPG2—is that right? Please try the following to see if it gets your gnupg2 agent to use GPGTools' bundled pinentry-mac:

    1) click the "Fix GPGTools" button from GPGPreferences > First aid, which has a step to clear a gpg-agent.conf entry for "pinentry-program" in order to allow GPGTools to attempt to assign a new one in step 2)

    2) re-try to generate a key in GPG Keychain Access

  4. 4 Posted by Isaac Hodes on 03 May, 2012 05:13 PM

    Isaac Hodes's Avatar

    do have GnuPG, though I'm not sure if that's what GPGKeychain Access is using.

    $ gpg2 --version gpg (GnuPG) 2.0.19

    I used "Fix GPGTools", and it appeared to succeed. However, I am still getting the same error (85), and no window to enter a pin.

  5. 5 Posted by Isaac Hodes on 03 May, 2012 05:13 PM

    Isaac Hodes's Avatar

    I do have GnuPG, though I'm not sure if that's what GPGKeychain Access is using.

    $ gpg2 --version
    gpg (GnuPG) 2.0.19

    I used "Fix GPGTools", and it appeared to succeed. However, I am still getting the same error (85), and no window to enter a pin.

  6. 6 Posted by cfraire on 03 May, 2012 05:39 PM

    cfraire's Avatar

    OK, please try this:

    1) From a Terminal, examine your "pinentry-program" in in your ~/gpg-agent.conf by running the following:

    $ grep pinentry-program ~/.gnupg/gpg-agent.conf
    

    and look for either no match (OK) or set to GPGTools' version; e.g.:

    pinentry-program /Applications/GPG Keychain Access.app/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac`
    

    2) Kill any running gpg-agent to ensure it reloads the gpg-agent.conf in step 3):

    $ killall gpg-agent
    

    3) Re-try to generate a key

  7. 7 Posted by Isaac Hodes on 03 May, 2012 08:53 PM

    Isaac Hodes's Avatar

    Thank you for all your help—I really appreciate it. Unfortunately, I do not have a gpg-agent.conf in ~/.gnupg, and no gpg-agents are running.

  8. 8 Posted by cfraire on 03 May, 2012 09:03 PM

    cfraire's Avatar

    Interesting. Well, GPGTools won't set a pinentry-program if no gpg-agent.conf file exists (and which I thought the "Fix GPGTools" button would ensure).

    So try this:

    1) Create an empty gpg-agent.conf

    $ touch ~/.gnupg/gpg-agent.conf
    

    2) $ killall gpg-agent to be sure

    3) Restart GPG Keychain Access, and retry to generate a key

  9. 9 Posted by Isaac Hodes on 03 May, 2012 09:19 PM

    Isaac Hodes's Avatar

    That worked for me—thanks so much!

  10. 10 Posted by cfraire on 03 May, 2012 09:57 PM

    cfraire's Avatar

    Great, glad I could help.

  11. Support Staff 11 Posted by Steve on 14 May, 2012 09:31 PM

    Steve's Avatar

    Glad, this could be solved. Chris, thanks for chiming in.

    Should this problem appear again with another user, we might have to tweak the auto-fix.

  12. Steve closed this discussion on 14 May, 2012 09:31 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac