Adding a OpenGPG keys - vague directions ; Unexpected results ?

Asked by John Donnelly on 2016-12-01

Hi ,

 I am trying to generate my first "OpenGpG " key for my new launchpad account ; and the directions say run "gpg --fingerprint" that generates a visual string " 0102 0304 0506 .. .. " to stdout ;

Well - " gpg --fingerprint "generates some files but no signature I can use ; There is a trustdb.gpg file generated .
jpd@jpd-VirtualBox:~$ gpg --fingerprint
gpg: keyring `/home/jpd/.gnupg/pubring.gpg' created
gpg: /home/jpd/.gnupg/trustdb.gpg: trustdb created

jpd@jpd-VirtualBox:~$ ls .gnupg/

private-keys-v1.d pubring.gpg S.gpg-agent trustdb.gpg

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2016-12-02
Last query:
2016-12-02
Last reply:
2016-12-02
Colin Watson (cjwatson) said : #1

I think you're possibly trying to follow the directions in https://help.launchpad.net/YourAccount/ImportingYourPGPKey, but you seem to have started in the middle. You need to follow the "Creating your OpenPGP keys with gpg" section before you can use the directions in the "Importing your key into Launchpad with gpg" section.

John Donnelly (jpdonnelly) said : #2

Hi

  Thanks for the help ;
  I was able to generate a GPG fingerprint using that procedure , but when I
  enter the 10 digit key into the field ; LP won't let me import the key afterwards.

  I'm stuck in a loop - I have a key ; when when the email get generated ?

John Donnelly (jpdonnelly) said : #3

It appears I have to export my GPG keys to a keyserver perhaps ?

Launchpad could not import your OpenPGP key
Did you enter your complete fingerprint correctly? (Help with fingerprints)
Is your key in the Ubuntu keyserver yet? You may have to wait between ten minutes (if you pushed directly to the Ubuntu key server) and one hour (if you pushed your key to another server). (Help with publishing keys)

Step 3 Select Remote > Sync and Publish Keys from the menu. Choose the Sync button. (You may need to add hkp://keyserver.ubuntu.com to your key servers if you are not using Ubuntu.)

John Donnelly (jpdonnelly) said : #4

I tried this procedure and it fails :

1. To upload the key using a web browser:

Export your key by issuing this command:

gpg --export -a "Key-ID" > mykey.asc

2.Copy the content of the file mykey.asc.

3.Open http://keyserver.ubuntu.com/ in a browser window.

4. Paste the copied content in the box under the label Submitting a new OpenPGP Key.

Click Submit.

I get :

 gpg --export -a "Key-ID"
gpg: WARNING: nothing exported

Manfred Hampl (m-hampl) said : #5

In that 'gpg --export -a "Key-ID"' command - did you use the string "Key-ID" or have you replaced it by the hexadecimal ID code of your key?

John Donnelly (jpdonnelly) said : #6

Hi,

No ; I simply used KEY-ID as noted:

Which "hex string " are you referring to ? I do have a $GPGKEY

jpd@jpd-VirtualBox:~/.gnupg$ echo $GPGKEY
D8FC66D2
jpd@jpd-VirtualBox:~/.gnupg$ gpg --export -a $GPGKEY
gpg: WARNING: nothing exported

John Donnelly (jpdonnelly) said : #7
Manfred Hampl (m-hampl) said : #8

Are you sure that D8FC66D2 is the hex ID of YOUR key?
This string is listed as the sample one in https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Generating_an_OpenPGP_Key

"You have now generated the key. In the above listing the key-id is D8FC66D2 (yours will be different). "

What is the output of "gpg --list-keys" on YOUR system?

John Donnelly (jpdonnelly) said : #9

jpd@jpd-VirtualBox:~/.gnupg$ gpg --list-keys
/home/jpd/.gnupg/pubring.gpg
----------------------------
pub 4096R/0D9B8C06 2016-12-01
uid John Donnelly <email address hidden>
sub 4096R/57CAFC32 2016-12-01

Best Manfred Hampl (m-hampl) said : #10

Your Key-ID is 0D9B8C06
So, please try
gpg --export -a 0D9B8C06 > mykey.asc

Manfred Hampl (m-hampl) said : #11

You should also set GPGKEY to 0D9B8C06 (instead of D8FC66D2).

John Donnelly (jpdonnelly) said : #12

Thank you . That produced a key text output .

Perhaps those LP directions could be improved a little ? Many of us have never had to use GPG ; or know the finer details .

This particular step is wrong .