How to use GUI pinentry program for GPG

I would always like to use the GUI version of entering my GPG passphrase. Currently my pinentry program is set the same on my laptop as my desktop. But the desktop always asks for my passphrase on the command line, and my laptop always asks using the GUI.

What do I need to set to force the use of the GUI on the desktop?

Current ~/.gnupg/gpg-agent.conf

pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
default-cache-ttl 600
max-cache-ttl 7200

Current ~/.gnupg/gpg.conf

default-key 26A32A76
require-cross-certification
keyserver-options auto-key-retrieve
keyserver hkps://hkps.pool.sks-keyservers.net
auto-key-locate hkps://hkps.pool.sks-keyservers.net
keyserver-options no-honor-keyserver-url
comment GPG
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
personal-digest-preferences SHA512 SHA384 SHA256 SHA224
no-emit-version
use-agent

Solution 1:

  • Try to uncheck Store passphrases in OS X Keychain by default and press Delete stored passphrases button in GPGPreferences if you installed GPG Suite.

  • Also try to comment this line from your ~/.gnupg/gpg.conf:

    use-agent