tag:gpgtools.tenderapp.com,2011-11-04:/discussions/problems/1305-gpg-keychain-access-generate-new-key-failed-code-85GPGTools: Discussion 2017-09-14T12:06:24Ztag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T14:04:59Z2012-05-03T14:04:59ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>I see in the GPGException list: GPGErrorNoPINEntry = 85</p>
<p>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?</p></div>cfrairetag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T16:25:56Z2012-05-03T16:25:57ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>This is how I get the problem to occur:</p>
<p>Click the "New" icon (with the key on it)<br>
Click "Generate Key"<br>
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?</p></div>Isaac Hodestag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T16:57:28Z2012-05-03T16:57:28ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>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:</p>
<p>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)</p>
<p>2) re-try to generate a key in GPG Keychain Access</p></div>cfrairetag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T17:13:04Z2012-05-03T17:13:05ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>do have GnuPG, though I'm not sure if that's what GPGKeychain
Access is using.</p>
<p>$ gpg2 --version gpg (GnuPG) 2.0.19<br>
…</p>
<p>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.</p></div>Isaac Hodestag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T17:13:34Z2012-05-03T17:13:34ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>I do have GnuPG, though I'm not sure if that's what GPGKeychain
Access is using.</p>
<p>$ gpg2 --version gpg (GnuPG) 2.0.19<br>
…</p>
<p>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.</p></div>Isaac Hodestag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T17:39:00Z2012-05-03T17:39:00ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>OK, please try this:</p>
<p>1) From a Terminal, examine your "pinentry-program" in in your
~/gpg-agent.conf by running the following:</p>
<pre>
<code>$ grep pinentry-program ~/.gnupg/gpg-agent.conf</code>
</pre>
<p>and look for either no match (OK) or set to GPGTools' version;
e.g.:</p>
<pre>
<code>pinentry-program /Applications/GPG Keychain Access.app/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac`</code>
</pre>
<p>2) Kill any running gpg-agent to ensure it reloads the
gpg-agent.conf in step 3):</p>
<pre>
<code>$ killall gpg-agent</code>
</pre>
<p>3) Re-try to generate a key</p></div>cfrairetag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T20:53:28Z2012-05-03T20:53:29ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>Thank you for all your help—I really appreciate it.
Unfortunately, I do not have a <code>gpg-agent.conf</code> in
~/.gnupg, and no gpg-agents are running.</p></div>Isaac Hodestag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T21:03:15Z2012-05-03T21:03:15ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>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).</p>
<p>So try this:</p>
<p>1) Create an empty gpg-agent.conf</p>
<pre>
<code>$ touch ~/.gnupg/gpg-agent.conf</code>
</pre>
<p>2) <code>$ killall gpg-agent</code> to be sure</p>
<p>3) Restart GPG Keychain Access, and retry to generate a key</p></div>cfrairetag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T21:19:38Z2012-05-03T21:19:38ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>That worked for me—thanks so much!</p></div>Isaac Hodestag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-03T21:57:55Z2012-05-03T21:57:55ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>Great, glad I could help.</p></div>cfrairetag:gpgtools.tenderapp.com,2011-11-04:Comment/157030592012-05-14T21:31:58Z2012-05-14T21:31:58ZGPG Keychain Access: Generate new key failed! Code = 85<div><p>Glad, this could be solved. Chris, thanks for chiming in.</p>
<p>Should this problem appear again with another user, we might
have to tweak the auto-fix.</p></div>Steve