Thursday, September 03, 2015

gpg keygen in su-ed user session

gpg keygen for the "user" in the su-ed session fails with the following error:

can't connect to `$HOME/.gnupg/S.gpg-agent': No such file or directory
gpg-agent[22760]: command get_passphrase failed: Operation cancelled
gpg: cancelled by user
gpg: Key generation canceled.

gpg keygen is having limitation to be run from the "ssh " session instead of being in su-ed ssh session.

Bugzilla link below defines the issue quite well in detail.
https://bugzilla.redhat.com/show_bug.cgi?id=659512

Solution:
To have a successful generation of the gpg keygen "user" needs to be in immediate ssh session instead of su-ed session.

cheers,
make world open.