Ask Your Question
5

GNOME Passwords and Keys / "Seahorse" doesn't display any of my GPG/PGP keys

asked 2015-10-22 19:05:49 -0500

terrycloth gravatar image

updated 2015-11-16 01:32:43 -0500

I'm running GNOME Passwords and Keys (Seahorse) 3.16.0 on Fedora 22 x64.

edit: This problem persists for me on a fresh install of Fedora 23 with Seahorse 3.18.0, and gpg 1.4.19 and gpg2 2.1.9.

Seahorse doesn't show any of my GPG keys. When looking under the GnuPG Keys tab, my mouse changes to the loading cursor, but when that stops, the keys list in Seahorse is still blank. I've double-checked that Seahorse is set to display all keys (in the menubar: View > Show Any).

My personal key pair are 4096-bit RSA, and I can find them normally with the commandline gpg --list-keys, but for some reason, not with gpg2. Both the commandline gpg2 --list-keys and Seahorse list no keys at all.

I've tried commenting the use-agent line in my ~/.gnupg/gpg.conf file and then rebooting. I've tried running Seahorse from the terminal, but it doesn't display any error messages or debugging info, and there's no debugging commandline switch that I can see in the man page. The GnuPG documentation mentions setting a variable to raise the debug level -- GPGME_DEBUG=9:/home/user/mygpgme.log -- but that doesn't have any effect for me.

Any suggestions or clarifying questions will be appreciated.

edit retag flag offensive close merge delete

Comments

bump. Anyone? Anyone at all?

terrycloth gravatar imageterrycloth ( 2015-11-06 05:08:53 -0500 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2015-11-16 02:51:43 -0500

terrycloth gravatar image

I don't know if this is necessarily the correct solution, but it works for me so far.

What got me thinking was the fact that gpg --list-keys displayed a bunch of keys, but running the same command with gpg2 did not. I believe Seahorse relies on gpg2. Maybe gpg2 and gpg use separate keychains or something?

Here's what I did:

  1. Export my personal key from the commandline with gpg (gpg --export-secret-keys "MY-EMAIL@EXAMPLE.COM" > secretkey.asc).
  2. Reimport my personal gpg key with gpg2. (I tried this with Seahorse first, but it said that it was already in my keyring, but I received no error messages when importing from the commandline: gpg2 --import secretkey.asc.)
  3. Sign or encrypt something. In this case, I signed a git commit, in a repo I made up just to test this, with git configured to use gpg2 (git config --global gpg.program gpg2).
  4. When prompted, enter my secret key's passphrase into the popup, and check "Remember this password" before hitting Enter.

I still don't really understand the problem, but I no longer have to re-enter my passphrase every time I use my GPG key.

edit flag offensive delete link more

Comments

1

I used gpg2 to import the keys and this worked for me.

cprofitt gravatar imagecprofitt ( 2015-11-17 21:59:54 -0500 )edit

In order to migrate everything (e.g. incl. uid image) you'll typically want to export from gpg and re-import into gpg2 both the secret keys as shown above as well as your public, so:

gpg --export-secret-keys >secretkeys
gpg --export >publickeys
gpg2 --import secretkeys publickeys

You should of course also wipe secretkeys after. Also note that you may only see it in “Passwords and Keys” [Seahorse] after a Desktop user session logout and re-login.

BTW: Also see https://bugzilla.redhat.com/show_bug.... .

vorburger gravatar imagevorburger ( 2016-09-05 13:13:52 -0500 )edit

Very useful. Thanks.

mosquito gravatar imagemosquito ( 2016-10-16 15:22:22 -0500 )edit
0

answered 2018-04-26 14:11:37 -0500

Aleksandar Kostadinov gravatar image

For some reason can't vote or comment atm. Trying to add an answer.

Short answer gpg and gpg2 are different programs and gpg 2.1 stores secret keys in the public key file. Thus secret keys are not shared between gpg and gpg2.

To move keys between them you can use gpg --export-secret-keys [key-id] | gpg2 --import and this avoids the need to write to disk (avoid the need to wipe).

More info on superuser: https://superuser.com/a/655250/111432

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-10-22 19:05:49 -0500

Seen: 6,234 times

Last updated: Apr 26 '18