#325803 keychain error adding gpg key; seems to think pinentry is not installed

#325803#5
Date:
2005-08-31 04:05:36 UTC
From:
To:
When using keychain to add a GPG key, I am experiencing an error message
that seems to say that keychain thinks pinentry is not installed, though
it is.  Below is the repeatable output in a login shell:

*** Begin sample output ***
KeyChain 2.5.5; http://www.gentoo.org/proj/en/keychain/
Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL

 * Found existing ssh-agent (7203)
 * Found existing gpg-agent (7185)
 * Adding 2 ssh key(s)...
Enter passphrase for /home/barryh/.ssh/id_rsa:
Identity added: /home/barryh/.ssh/id_rsa (/home/barryh/.ssh/id_rsa)
Identity added: /home/barryh/.ssh/id_dsa (/home/barryh/.ssh/id_dsa)
 * Adding 1 gpg key(s)...
 * Error: Problem adding (is pinentry installed?); giving up
*** End sample output ***

The keychain invocation from ~/.bash_profile is as follows
*** Begin .bash_profile excerpt ***
# Keychain usage
keychain --nogui id_rsa id_dsa 80B2D10A
    [[ -f $HOME/.keychain/$HOSTNAME-sh ]] && \
        source $HOME/.keychain/$HOSTNAME-sh
    [[ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]] && \
        source  $HOME/.keychain/$HOSTNAME-sh-gpg
*** End .bash_profile excerpt ***

The following packages are installed on the system:
$ dpkg -l pinentry*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
un  pinentry       <none>         (no description available)
ii  pinentry-curse 0.7.2-2        curses-based PIN or pass-phrase entry
dialog
ii  pinentry-doc   0.7.2-2        documentation for pinentry packages
un  pinentry-gtk   <none>         (no description available)
ii  pinentry-gtk2  0.7.2-2        GTK+-2-based PIN or pass-phrase entry
dialog
un  pinentry-qt    <none>         (no description available)
un  pinentry-x11   <none>         (no description available)

$ dpkg -l gnupg*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  gnupg          1.4.1-1        GNU privacy guard - a free PGP replacement
ii  gnupg-agent    1.9.15-6       GNU privacy guard - password agent
ii  gnupg-doc      2003.04.06-4   GNU Privacy Guard documentation
un  gnupg2         <none>         (no description available)

Regards,
--
Barry Hawkins
site: www.bytemason.org
weblog: www.yepthatsme.com

Registered Linux User #368650

#325803#14
Date:
2014-12-27 08:26:50 UTC
From:
To:
Control: tags -1 moreinfo

Check that your ~/.gnupg/gpg-agent.conf does not contain an incorrect
pinentry-program line, as explained here:
http://brondsema.net/blog/index.php/2007/02/06/keychain_gpg_agent_pinentry_problems

#325803#19
Date:
2014-12-27 08:26:50 UTC
From:
To:
Control: tags -1 moreinfo

Check that your ~/.gnupg/gpg-agent.conf does not contain an incorrect
pinentry-program line, as explained here:
http://brondsema.net/blog/index.php/2007/02/06/keychain_gpg_agent_pinentry_problems