How do I make a PGP key?
How do I make a PGP key? I'd like to have it for signing PPA uploads and such.
Generating a PGP Key
Here is a GUI way to generate a new PGP key.
-
Open the Passwords and Keys (Seahorse) application
This screen will appear.
Either go to
File
→New
in the global menu or hit Ctrl + N-
In the Create New ... window select PGP Key and hit Continue
-
Enter your full name and your email address, the comment is optional
-
Enter a strong password which you'll remember
Wait for the Generating key dialog to finish (this may take a while)
You're done!
You can find your key in the Passwords and Keys application's My Personal Keys tab.
Uploading your key to Launchpad
Uploading your key to Launchpad is just a few clicks.
Go to Launchpad.net and log in
-
On your profile page click on the yellow edit button (a round button with a grey pencil icon) next to OpenPGP keys
Note: The URL to that page looks like this
https://launchpad.net/~yourusername
Open the application Passwords and Keys (Seahorse)
Navigate to the My Personal Keys tab
Select your key and go to
Remote
→Sync and Publish Keys
in the global menu-
Hit Sync
Note: The Sync button may be grayed out if no sync server is selected. In that case:
-
Hit the Key Servers button
-
Select the
hkp://keyserver.ubuntu.com:XXXXX
key server from the Publish keys to list and hit close
-
Double click your PGP Key from the list on the My Personal Keys tab
-
In the key window that just appeared navigate to the Details tab, select the Fingerprint with your mouse and hit Ctrl + C
-
Paste the just copied fingerprint into the Fingerprint text field on the Change your OpenPGP keys page on Launchpad and hit Import Key
You're done!
Creating your OpenPGP keys with gpg
Step 1: Open a terminal and type:
gpg --gen-key
Step 2: GPG will now ask you a number of questions about the type of key you want to generate. follow the steps below to select the default option each time.
Step 3: Check that your key has been generated by typing gpg --list-keys
and, if successful.
pub 1024D/12345678
-> this is the important number
Step 4: Launchpad doesn't store your key directly, so you need to export your public key to a key server, such as keyserver.ubuntu.com:
gpg --keyserver keyserver.ubuntu.com --send-keys 12345678
Replace 12345678 with the pub id you noted in step 3.
If successful, GPG will display a message similar to:
gpg: sending key 12345678 to hkp server keyserver.ubuntu.com
Importing your key into Launchpad with gpg
Step 1: Launchpad identifies your OpenPGP key by its fingerprint. In your terminal, you can ask GPG for your key's fingerprint by typing:
gpg --fingerprint
GPG will display a message similar to:
Key fingerprint = `0464 39CD 2486 190A 2C5A 0739 0E68 04DC 16E7 CB72`
copy only the numeric fingerprint: 0464 39CD 2486 190A 2C5A 0739 0E68 04DC 16E7 CB72
.
Step 2: Visit your OpenPGP
Step 3: Paste the fingerprint that you copied in step 1 into the Fingerprint text-box, then click the Import Key button. Launchpad will use the fingerprint to check the Ubuntu key server for your key and, if successful, send you an encrypted email asking you to confirm the key import.
Note : this is a brief ... from launchpad process..... both process take a while so just take your time...