After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757387 - Can't send email with GPG signing due to gpg-agent
Can't send email with GPG signing due to gpg-agent
Status: RESOLVED NOTABUG
Product: evolution
Classification: Applications
Component: Mailer
3.16.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2015-10-30 20:15 UTC by QkiZ
Modified: 2015-11-05 06:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description QkiZ 2015-10-30 20:15:18 UTC
In Ubuntu 15.04 version I have no problem with sending emails that are signed with GPG key. After upgrade to 15.10 and new version of Evolution I cant send signed emails. I get:
Because "gpg: problem z agentem - zostaje wyłączony
gpg: zapis do ,,-''
gpg: RSA/SHA512 podpis od: "FD615ACD QkiZ Mx <some@email.com>"
", you may need to select different mail options.

This means: problem with agent - gpg signing is switched off, cant write to -
Comment 1 André Klapper 2015-10-30 21:07:39 UTC
Has this been reported to Ubuntu's bugtracker?
Comment 2 QkiZ 2015-10-30 21:22:38 UTC
Yes and they redirect me here with this bug.
https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/1510692
Comment 3 Milan Crha 2015-11-03 12:07:23 UTC
Thanks for a bug report. Ubuntu versions are nice, but the Evolution version is important here.

Depending on your evolution(-data-server) version, either gpg2 or gpg is preferred as the gpg software. The error you see is returned by it. I do not know why they think that this has much to do with the evolution, apart of it calling gpg in the background.

If I translate the error properly, it's not the "gpg signing", but the "gpg agent", which is switched off. The agent is a gpg term for a software which (usually) provides passwords for keys to the gpg binary. It depends on your desktop environment what agent is used. For example GNOME Shell uses gnome-keyring as the gpg agent (gpg sometimes claims issues about stolen agent by the gnome-keyring, I only do not recall the message precisely).

Try to run the below command from a terminal:

   $ echo a | /usr/bin/gpg --sign --detach --armor -u FD615ACD --output -

You should be asked for the password for your private key. Try using also gpg2 binary, if you've it installed. You should get the same behaviour as in the Evolution with one of them.

You can tweak gpg settings in ~/.gnupg/gpg.conf , search for 'agent' there (there is a use-agent directive). I think this applies only to gpg binary, not for the gpg2 binary, but I'm not sure, I'm not a gpg expert by any means.

Could you verify that, please?
Comment 4 QkiZ 2015-11-03 18:54:24 UTC
Ubuntu also uses gnome-keyring. 
Output of command:

Musisz podać hasło aby odbezpieczyć klucz prywatny dla
dla użytkownika: "QkiZ Mx (oficjalny klucz) <some@email.com>"
długość 4096 bitów, typ RSA, identyfikator FD615ACD, stworzony 2015-01-13

gpg: problem z agentem - zostaje wyłączony
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJWOQC4AAoJEIzdtQrxYXrNLrMP/jHFhFKhERXIo85sidMutaSc
PKIYqa9tsjCGrpSJjucz9bZV5RweZpZMSLYjwfZ+4/Y8KzuP0HMBli3ijhAV1pc0
YFKWqc0IPJlPdlOKQmpfdvBAst7J7Yju1KDGKMdVHoikaUanXCK2iPqUm4iq+WdM
J35uhkdYtlfjc+ASab/WgnHKSpDSGDMCgWssx47ArmeCm5JaaQvnJ2EVssMF9zf8
R3BVbzTMSj6PF5FxnnJ/erUY6xJK5elwfolvZgv1UswerbuY2OjjUP+VGnjVRM19
lKnKcXi/DSBthhh6R2rzTru8mV43vx3QRX0reAzCzN5tXKpqelBPkOgr2TD7opsO
gQAxr33y0ep5+sFDdOLHEcClDot8/haF/WU/PQ6gr9ZN/lBNIdeFEbN5o/vSjzHJ
cJdpIF9igrsMsT50R+zusKu/ja3fd36tU719RidrxswIKIIR7vrr6E+RX3ziLoux
+SU/aWEHFeMIqXQYnLZtnk8aLDPeTlP0H/4iOwZvvYwjCIAm5aruicLVr0zstZmE
IG4EMHj8kKZjpRY1NEIoFRjjt+Tt7Jx1NQPUfZFf5OAwPPmwgZ90q23T3WzX6w+m
OvkewhdY3kxBOyL6U/RwYk/LrrmxVPm+130q+QEiUPhLxE5Fn5f5KInrWPw5yCKY
26wMvyEVy1irJ4eCKq8k
=urtK
-----END PGP SIGNATURE-----

It looks like problem with gpg, but text was signed.
Comment 5 Milan Crha 2015-11-04 06:55:45 UTC
Did both gpg versions work the same?
Comment 6 QkiZ 2015-11-04 18:26:14 UTC
GPG v1:
echo a | gpg --sign --detach --armor -u F1617ACD --output -

Musisz podać hasło aby odbezpieczyć klucz prywatny dla
dla użytkownika: "QkiZ Mx (oficjalny klucz) <some@email.com>"
długość 4096 bitów, typ RSA, identyfikator FD615ACD, stworzony 2015-01-13

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJWOkvHAAoJEIzdtQrxYXrN66oQAJoQ9seD9JJX/DeUoqPzGzAq
1BTqkr83HlKb1tr7v/W/Cn7FRJAbHbNlaIM5rkgUUIeBjdZbsMQeE1I4HP7ogjC1
lkInN46q/OcyV0UMUbZiXBYoS5iUo7k8NMXSK2uLqsYmCkUSfgnNz0WI1svxZe5+
EeJWrIm4MrsRv5XW8Mpoh87V2YokleDYdSS59aCAqbWFuD1mEspdRMdQaH0BgWq0
gNeygpzohl0MLxtGuFn4RNNqQYUQRy61KeDFDX+lkchIfwLiu10UgyXE1JPEVWgg
sCTHQtBC8C0FBnW+l2GEiXWALKjXR5M85M4iKYrNKbYeJGxoeVZo7+2QrQgQmB9Q
abNG+CJG4HFE0S5sGMGcBXr8hRkyDffYBUKVg+5a6KuQ+WXPPg3Xxn3ARVmVW7d/
KxJvSTGStyWywSeUl39tQvlVxNJLEfkN0HFKae/EQkmoOCbnW8n//JqWOpKmqJBi
CvUERznz0tfMJ6+p5WacU5CH30bJ+HjZsKpjV4XFwFmGC/RR+2r0QZZ6L/fyoOYU
F0fFIrX3Zprz1TK77hityaofpBubW3sZxMrpv3WsQYPDk7fb5oOgOe+HGcaow/3y
ajq4ttefYuLRSs8Zzog1uZZ7CAhL1U+eNa+NMEiXK38uR+j32b5yjJBiTrcLUy6o
V/Es26gI+3IQ0OvlqxY6
=PH45
-----END PGP SIGNATURE-----

GPG v2 after typing password in GTK window:

echo a | gpg2 --sign --detach --armor -u FD615ACD --output -

Musisz podać hasło aby odbezpieczyć klucz prywatny użytkownika:
,,QkiZ Mx (oficjalny klucz) <some@email.com>''
długość 4096 bitów, typ RSA, numer FD615ACD, stworzony 2015-01-13

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABCAAGBQJWOkyPAAoJEIzdtQrxYXrNX+IP/juPkOsAdCXPhudSfVct95R+
PlwM0vM3dMzAue5Vqg1Mm02iEng5SxhmDAHPnlbDA6s9F/dE/EnX0V1dkooZ+YU1
Hlp4EG9kdiU3Mxt9B+d9k8dD0Ouynd3lSkqqfrwisVOFtxErR7fqOxpRrHyouAbd
z+wbQ3WWdDpmIXO9dXjBo55Zq2VxsFIVNXTN3VLKl2JonZdb2SJOTzL9uoV19yxo
Q6dGnIO8/kYqo+d38g5rGmUTe6HhP2v58MX89uT6V8VPRMYhazWSEB2Du3EEgoJi
JyAvby1m2pDDw43tAExJFkFpzg76WvefM348l5aBwr09FwRdrig3LHsu6EGTLuvD
cegldJndM79kk9l1bAaSZJFKVHHeR4bjTtU1C0BNMgzH6L9eWmI6NCnp1mzytotd
/li3PdjP8JDSLhF1Cs1EA1ACoNdfaSnmM86xVjXvaFJpaxQz4AmZmeIfEimdMejl
Vy36eEXVNIAOYyhsV1Jiy0AiADf3zvCRLSlCHW8fwtbWJ8eplgpD8v0X0YrJoUU3
j++pW+tsQmT8V/SHM9VPdScIDp7j0I85mogEhvaxHTXqePqHsTVRBULPKLewfLaz
TTxr7ZTJrdT59yMojzeXaCBvXVOHUxHaloVllDMfgJ+Kwv8RjAZsgoCVyC1BN+Yz
A7oGN85i81u3+I+OYRUl
=ON5A
-----END PGP SIGNATURE-----


Strange, no error. When I emailed message with sign there was no error also.
Comment 7 Milan Crha 2015-11-05 06:30:55 UTC
(In reply to QkiZ from comment #6)
> Strange, no error. When I emailed message with sign there was no error also.

Thanks for testing it again. I believe it's because the agent didn't run properly earlier, but it runs properly now.