10.7: GPGTools and Homebrew: compatibility status

Nicola's Avatar


28 Mar, 2014 10:59 AM

GPG Keychain Access 1.1.3 (601)

It is my understanding that the current version of GPGTools should work with alternate gpg2 and gpg-agent installations. I have installed all the GPGTools components with the exception of MacGPG2. I have installed gpg 2.0.22 and gpg-agent using Homebrew. When I try to generate a key using GPG Keychain Access I get the following error:

Error text:
Error opening terminal: unknown.
gpg-agent[23710]: command get_passphrase failed: End of file
gpg: problem with the agent: End of file
gpg: /dev/fd/5:0: key generation canceled

How to fix that?

  1. Support Staff 1 Posted by Luke Le on 28 Mar, 2014 03:07 PM

    Luke Le's Avatar

    Hi Nicola,

    it sounds like the agent has crashed for some reason.
    You could have a look in the Console.app to check if you find the crash log for it.
    Other than that, I've not seen that error before.

    Is there any specific reason you wish to use your own gnupg?

  2. 2 Posted by Nicola Vitacolo... on 28 Mar, 2014 08:06 PM

    Nicola Vitacolonna's Avatar

    Nothing special in the Console: just that error message. Generating and revoking keys works fine from the command line. But I’ve noticed that gpg2 is using pinentry-curses (pinentry is a symlink to pinentry-curses): could it depend on that?

    > Is there any specific reason you wish to use your own gnupg?

    Not really. I have had gpg2 already installed with Homebrew for some time. Does MacGPG2 differ in important ways from a normal gpg2 build?


  3. Support Staff 3 Posted by Steve on 28 Mar, 2014 08:55 PM

    Steve's Avatar

    Hi Nicola, I don't think it differs a lot. But we know that it works ;)

    You could indeed try removing the custom built gpg2 and reinstall the GPG Suite. Should be working then.

  4. 4 Posted by Nicola Vitacolo... on 28 Mar, 2014 08:58 PM

    Nicola Vitacolonna's Avatar

    Ok then.

    Thanks for the quick feedback!

  5. 5 Posted by Nicola Vitacolo... on 29 Mar, 2014 10:05 AM

    Nicola Vitacolonna's Avatar

    Just for reference, the problem was indeed pinentry. I’ve built pinentry-mac from https://github.com/GPGTools/pinentry-mac and set

        pinentry-program /Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac

    in `~/.gnupg/gpg-agent.conf`. Now the tasks that require a passphrase (e.g., generating a key in GPG Keychain Access or signing a message in Mail.app) work properly.

    Someone has already asked in this list about decoupling MacGPG2 from pinentry-mac in the GPGTools installer. Add my vote for adding that feature.


  6. 6 Posted by Mento on 02 Apr, 2014 12:28 PM

    Mento's Avatar

    Hi Nicola!

    pinentry-mac is also included in Libmacgpg (which is delivered with every of our tools).
    The path is "/Library/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac"
    Normally this path should be set automatically.

    Regards, Mento

  7. 7 Posted by Nicola Vitacolo... on 02 Apr, 2014 06:19 PM

    Nicola Vitacolonna's Avatar

    Good to know! I will certainly give it a try.

  8. Steve closed this discussion on 01 Jun, 2014 03:19 PM.

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

Keyboard shortcuts


? 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