Imported gpg keys do not show up in Seahorse 3.18.0

Bug #1577198 reported by 5a54a
152
This bug affects 31 people
Affects Status Importance Assigned to Milestone
seahorse
Fix Released
Unknown
seahorse (Ubuntu)
Triaged
Low
Unassigned

Bug Description

After clean install of Ubuntu-Gnome 16.04 LTS I tried to import all my previous exported gpg keys. Although it seems the keys are imported, they do not show up in seahorse (Passwords and Keys). Also Evolution did not find to proper keys to decrypt messages.

It seems however that the keys have been imported under gpg1 in stead of gpg2. This can also be confirmed with the list command (gpg --list-key and gpg2 -- list-keys).

Importing all keys by command (gpg2 --import Multiple_Keys.asc) seems to work.

See also the same problem already reported by Andreas Happe on:
https://www.snikt.net/blog/2016/02/27/evolution-seahorse-gpg-gpg2-woes/

5a54a (5a54a)
description: updated
Revision history for this message
napsc (untrustytahr) wrote :

I am also having this problem. Same scenario:

1. Fresh install to 16.04.
2. Import public keys using menu in seahorse.
3. Keys do not appear in seahorse but can be listed using gpg –list-keys (from gpg(1) )
4. Importing the keys from CLI with gpg2 (gpg2 –import-keys <file>) and the keys will appear in seahorse.

So it appears that the import function in seahorse is using gpg(1) but the viewing of keys is pointing to gpg2.

I cannot confirm whether Evolution or Thunderbird sees keys as I do not use them.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in seahorse (Ubuntu):
status: New → Confirmed
5a54a (5a54a)
description: updated
Revision history for this message
Adi (adi5) wrote :

I posted some lines from the key storing files under https://bugs.launchpad.net/ubuntu/+source/seahorse/+bug/1588605

Seahorse stores imported key in a particular file when importing and takes keys from a different when using them. It seems to have a relation with the new gnupg-keybox-file.... *.kbx
[CODE]
adi@bluestar:~$ gpg2 --list-public-keys
/home/adi/.gnupg/pubring.kbx
[/CODE]

5a54a (5a54a)
description: updated
Revision history for this message
Benjamin Bach (benjaoming) wrote :

I agree, this was a very annoying bug as there are no error messages. Keys are just missing, and importing the old pubring.gpg through both Seahorse and Enigmail interfaces doesn't work.

The "bug" also affects Enigmail.

There is a nice description here regarding how to export your old pubring.gpg to pubring.kbx, retaining owner trust: http://stackoverflow.com/a/34221494/405682

Revision history for this message
Kevin M. Gallagher (kevingallagher) wrote :

Will this ever be fixed? Seahorse is at 3.20 and it still doesn't readily find keys from the GnuPG version 2 Keybox (.kbx) format.

Revision history for this message
Dennis Baudys (thecondordb) wrote :

The same bug can still be observed with seahorse 3.32.1-5-g1dd5b4d6 in Manjaro 4.19.45-1 x86_64 and Xfce 4.13 by the way. The above mentioned workaround to import GPG public keys with:

gpg2 --import Multiple_Keys.asc

seems to work. However seahorse likes to crash when I then try to change the owner trust of the imported GPG public keys.

I have to try this also in Ubuntu 18.04, however I don't think it makes any difference.

Changed in seahorse (Arch Linux):
status: Unknown → New
Changed in seahorse (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
bostongeek24 (markdymek) wrote :

this is also bugged in arch as well. any chance of this getting fixed?

affects: seahorse (Arch Linux) → seahorse
Revision history for this message
Mike Loiterman (mloiterman) wrote :

I’m seeing the same issue on Pop!_OS 19.10.

Revision history for this message
Tamas Toth (tamas-toth-ebola) wrote :

Ok! So the bug is still here but for me a little bit different. Being on Ubuntu 19.10 with its own Gnome the situation is the following.

Originally the system has just 'gpg' not 'gpg2' BUT basically the original 'gpg' is 'gpg2' as it's version is 'gpg (GnuPG) 2.2.12'. After installing gpg2 there is no so much change it just gave me a symlink from 'gpg2' to the system original 'gpg'. So basically now on 19.10 the 2 gpg is the same.

Let's check the keyring thingie. It is not too surprising that both of them use the same home dir: 'Home: /home/{user}/.gnupg' and of course the same keyring: /home/{user}/.gnupg/pubring.kbx. And because between the 2 thing there is any differences.

So what about Seahorse. Ubuntu 19.10 has 'Seahorse 3.32.2'. If I import a key from CLI through 'gpg' or 'gpg2' the key will be available int the mentioned keyring and CLI gpg can use it. But if I import the key from the Seahorse GUI the result what you all mentioned. Seems succeed but after the 'successfully imported' message there is no new key in Seahorse. Moreover the successfully imported key is also not in the gpg keyring verifying from CLI. Seahorse tells the everything ok on the import but the corresponding key is nowhere.

BUT! if you restart your gnome user session, VOILA the missing key appearing in Seahorse.

Sadly restarting the seahorse daemon not do the work so we really need to logout and login again.

This is very interesting as seems Seahorse not use directly the gpg keyring (something like PAM in Samba processes what otherwise I never understand completely), but a maintainer process sync their content.

So what I (we) know now that Seahorse simply not use gpg keyring as I simply import anything in vain in Seahorse that not appear in gpg keyring verified from CLI (and as the topic bug tells it also sadly not appear in Seahorse itself:D but in this case who know were are they?!...). Also in vain, if I imported anything in CLI gpg, the result is perfect in CLI gpg, but not appear in Seahorse.

And partly therefore the other thing is the conclusion, that Seahorse use 2 different backend for itself and those both are different from CLI gpg keyring (what is not so nice). One backend is used by the GUI and another is in real processes. And what I can see that the 2 backend sync each other at user login (something like as PAM with Samba).

Very interesting working method and it would be really nice to have a fix on it as the current result is more then uncomfortable. But if at least the GUI could communicate this also would be more than nothing.

Thanks for your attention and efforts also in advance!

Revision history for this message
Yannick (yann1ck) wrote :

I can confirm the behaviour Tamas descripes. I restarted the whole system not just the user session, but the result should be the same.

A fix for this, at least an error message pointing to gnupg would be great.

Revision history for this message
Martin (martin22) wrote :

On Ubuntu 20.04, I confirm that I cannot import a GPG key in seahorse, which in turn prevents me to import an email key for Evolution.

Restarting the session does not work for me.

Revision history for this message
Ro (robert-markula) wrote :

Confirmed that on Ubuntu 20.04, neither private nor public GPG keys exported by Seahorse on Ubuntu 18.04 show up, regardless of a restart.

Revision history for this message
Talha Asghar (iamtalhaasghar) wrote :

I am Experiencing Same issue !!

When I import a GPG key in Seahorse it does not appears in Seahorse but when I list all gpg keys using `gpg --list-keys` command I can see my new key in output.

Changed in seahorse:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.