1

I created a GPG key with Ubuntu 16.04's "Passwords and Keys" and pushed it to the Ubuntu server. I tried to import into Launchpad, but when I got the email to decrypt, I keep getting an error saying 'gpg: decryption failed: secret key not available'

I have encrypt subkey and sign,certify subkey. I've tried to see if there was a way to add a decrypt subkey, but I am not seeing it under the gui.

What am I doing wrong?

4
  • GnuPG is not aware of the secret key. Are you using the same computer for decryption you used for key creation? Did you create the key under the same user account? What's the output of gpg -K?
    – Jens Erat
    May 13, 2016 at 8:58
  • Yes I created this key on this machine/user about a week ago. gpg -K (capitalized) returns nothing. but lowercased it returns: /home/username/.gnupg/pubring.gpg ---------------------------- pub 2048R/F5E1B7DE 2016-05-08 uid TR Precht <[email protected]> uid Travis Precht<[email protected]> uid [jpeg image of size 3928] sub 2048R/47D28DC1 2016-05-08
    – TR Precht
    May 13, 2016 at 20:50
  • If it is missing in gpg -K (the long version for -K is --list-secret-keys, -k with a small letter only lists public keys), GnuPG does not find the secret keys. Also try gpg2 -K and sudo -H gpg -K (to make sure you didn't create the key as root by accident).
    – Jens Erat
    May 14, 2016 at 7:13
  • 1
    gpg2 -K seemed to work. I was able to decypt using 'gpg2' instead of gpg
    – TR Precht
    May 15, 2016 at 3:49

1 Answer 1

0

gpg2 -K seemed to work. I was able to decypt using 'gpg2' instead of gpg

Then you're already using GnuPG 2.1, which stores the secret keys in the pubring.gpg. Either never use gpg (GnuPG 1) at all, or copy the secret key to secring.gpg used by GnuPG 1 by exporting and importing it:

gpg2 --export-secret-keys [key-id] | gpg --import

You might also need to apply ultimate trust to the key:

gpg --edit-key [key-id]

On the GnuPG command line, now run the trust command and select ultimate.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .