[Bug 1257706] Re: gpg-agent environment variables not correctly exported
Michael Bienia
michael at bienia.de
Sun Dec 8 14:33:33 UTC 2013
It depends on what you intend to use gpg-agent for. For caching of your
passphrase of your gpg private key, I assume you don't need the SSH
variables exported. But if you want gpg-agent to use as a ssh-agent too,
you need to pass --enable-ssh-support to gpg-agent and export
SSH_AUTH_SOCK (the man page only mentions SSH_AUTH_SOCK in the
examples).
I use gpg-agent as a ssh-agent too, so I can use my OpenPGP card for SSH
authentication. I've attached my ~/.init/gpg-agent.conf (used by upstart
user sessions) which starts gpg-agent with --enable-ssh-support and
exports SSH_AUTH_SOCK. Put it in your ~/.init/ and upstart will use it
instead the one from the package.
I doubt this can be included in the package itself (perhaps as an
example for those users who need it) as gpg-agent will then compete with
ssh-agent (from the openssh-client package) who sets the SSH_AUTH_SOCK
variable and might upset users of ssh-agent. gnome-keyring can also act
as a ssh-agent so there are at least three competioners for that
variable.
** Attachment added: "~/.init/gpg-agent.conf"
https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1257706/+attachment/3925322/+files/gpg-agent.conf
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gnupg2 in Ubuntu.
https://bugs.launchpad.net/bugs/1257706
Title:
gpg-agent environment variables not correctly exported
Status in “gnupg2” package in Ubuntu:
New
Bug description:
Since Ubuntu 13.10, there is an Upstart script /usr/share/upstart/sessions/gpg-agent.conf which launches the gpg-agent daemon and then export the GPG_AGENT_INFO environment variable:
initctl set-env --global GPG_AGENT_INFO=$GPG_AGENT_INFO
This is enough to prevent the /etc/X11/Xsession.d/90gpg-agent script from launching gpg-agent itself, but it's not enough to actually use gpg-agent, you also need to export SSH_AUTH_SOCK and SSH_AGENT_PID.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1257706/+subscriptions
More information about the foundations-bugs
mailing list