gpg-agent upstart script doesn't set SSH environment variables
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | gnupg2 (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
Background:
GPG supports authentication keys that can be used in place of normal SSH keys with little effort on the part of the user by using the "enable-
Prerequisites:
Typically, gpg-agent has SSH_AUTH_SOCK and SSH_AGENT_PID overwritten by either gnome-keyring or ssh-agent upstart jobs if they are enabled so for the use case of using GPG authentication keys in place of normal SSH keys, we are assuming that both of these services are being bypassed by setting their ~/.config/
Expected:
When gpg-agent.conf contains "enable-
(Note: This should only happen if "use-agent" is present in the gpg.conf as well. Otherwise, the gpg-agent won't start and if the gpg-agent is not started, all of this is pointless)
Actual:
SSH_AUTH_SOCK and SSH_AGENT_PID are not set when the gpg-agent upstart job is started and SSH-related applications cannot access keys that are in GPG. GPG_AGENT_INFO is set properly by the upstart job.
Additional info:
lsb_release -rd:
Description: Ubuntu 14.10
Release: 14.10
apt-cache policy gnupg2:
Installed: 2.0.24-1ubuntu2
Candidate: 2.0.24-1ubuntu2
Version table:
*** 2.0.24-1ubuntu2 0
500 http://
100 /var/lib/
Related branches
- Marc Deslauriers: Approve on 2015-04-28
-
Diff: 44 lines (+22/-0)2 files modifieddebian/changelog (+8/-0)
debian/gpg-agent.user-session.upstart (+14/-0)
| affects: | gnupg (Ubuntu) → gnupg2 (Ubuntu) |
| Mark Adams (kramsmada) wrote : | #1 |
| Changed in gnupg2 (Ubuntu): | |
| status: | Fix Committed → Confirmed |
| Michael Bienia (geser) wrote : | #3 |
See also bug #1257706 which this bug is a duplicate of and should be merged with (I'm not sure yet in which direction to merge these bugs).
| Iain Lane (laney) wrote : | #4 |
Uploaded, thanks!
| Changed in gnupg2 (Ubuntu): | |
| status: | Confirmed → Fix Committed |
| Launchpad Janitor (janitor) wrote : | #5 |
This bug was fixed in the package gnupg2 - 2.0.26-6ubuntu2
---------------
gnupg2 (2.0.26-6ubuntu2) wily; urgency=medium
[ Mark Adams ]
* Updated debian/
variables SSH_AUTH_SOCK and SSH_AGENT_PID are set if gpg-agent is running
with SSH support. LP: #1407513
[ Iain Lane ]
* Fix whitespace in user session job.
-- Mark Adams <email address hidden> Tue, 05 May 2015 13:09:36 +0100
| Changed in gnupg2 (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| Dimitri John Ledkov (xnox) wrote : | #6 |
This looks very cool, I'll test it more.


I've added a fix for this issue and requested review. (I marked ~mdeslaur as reviewer, but anyone who wants can comment).
I am a new contributor so I definitely welcome your feedback.