Help
cancel
Showing results for 
Search instead for 
Did you mean: 
bcl
Copilot Lvl 2
Message 1 of 6

Adding a gpg key isn't working

Solved! Go to Solution.

When I try to add a gpg key to my account I get this error:

"keyring packet should only contain a single entity"

 

I've tried with both my personal key and my work key and get the same results.

You can see the key here - https://keys.fedoraproject.org/pks/lookup?search=0xD29845A70F5017DE&op=vindex

5 Replies
bcl
Copilot Lvl 2
Message 2 of 6

Re: Adding a gpg key isn't working

And oddly enough when I paste the key from the keyserver instead of the one exported locally it works.

Highlighted
Pilot Lvl 1
Message 3 of 6

Re: Adding a gpg key isn't working

I had this probelm when trying to copy/paste keys created on Windows 10.

 

Sometimes exported keys get unwanted or unintended formatting.  Its best just to cat out the key and copy paste it directly from the Terminal.  That way (unless you have some custome setup for your terminal output) you can be sure that you are copying just the key in plain text, without any extra formatting or anything.

 

If you can't cat the key and copy directly from Terminal, then I would suggest copy pasting your key into a text editor that is specifically designed for handling code.  This will make sure that they key is pasted in plain text and it will allow you remove any unwanted formatting.

 

If you don't have a native program, you can use pastebin - you will just have to remember not to actually save your key, or at the very least delete it aftewards.

 

Its always probably a good idea to note that although my problem was created by Windows 10 - any system, even a Linux based one, can add weird formatting or characters to your key if you try opening it with native programs instead of directly copying from Terminal.

Solution
Pilot Lvl 2
Message 4 of 6

Re: Adding a gpg key isn't working

@bcl we've seen this before: the key probably exists twice in your local keychain and the export command copies both. The GitHub importer only sees that there are two keys, not that they are identical. Here's your key after importing into a fresh keychain and exporting it, try this one.

 

https://gist.github.com/seveas/89d5e3cf1aaa313fe042909c02849b96

bcl
Copilot Lvl 2
Message 5 of 6

Re: Adding a gpg key isn't working

Ah, that could be. I was able to successfully import the one available from the Fedora keyserver, thanks!

Ground Controller Lvl 1
Message 6 of 6

Re: Adding a gpg key isn't working

The solution for me was specifying the key with the ID rather than the email address (as I have multiple keys with the same email address). For example:

 

$ gpg --list-secret-keys
$ gpg --export --armor --export-options export-minimal E2C9C068023C05F0 <-- Your key ID here