How To (GPG) Sign the Ubuntu Code

Saturday, February 18, 2006

One of the most frustrating parts of learning is the process itself. Good thing how-to's abound on the web. But when Mr. Google just doesn't get you there, you turn to your friends and your community. Here's a mini-how-to on how I finally figured things out. My thanks to my friend Dave and Ealden (a regular of the #ubuntu-ph channel). They helped me put together the pieces to this puzzle. I'm actually writing this a day after I did this, so pardon any mistakes. Please comment so I can correct any inaccuracies.

Now the first thing you've go to do is get yourself an OpenPGP key. Do this by opening a terminal and type:

$ gpg --gen-key

Follow the instructions. You'll be asked for a few other things, like what kind of encryption you'd like. I chose DSA-ElGamal. Then I chose 1024 bits for the bit-strength. Then you'll have to choose how long you'd like the key to be valid. Your choice. You'll also be asked for a few other things, like your full name, email address and for a comment. I used comment to indicate my online handle - Daysleeper Ed. You also need to input a passphrase. Its like a two-word password for your GPG. A site with instructions for picking a good passphrase can be found here: Done? We're doing great so far.

When generated you need to send your key to Ubuntu's servers (or whatever the default is, not entirely sure). This step validates you as the owner of the key. Type this in the terminal:

$ gpg --send-key ########

where ######## is your key. If you're not sure what it is, type:

$ gpg --list-keys

Now that you've got a valid key, you can sign the code. First, you'll have to have a Launchpad account. Create one by filling-up the register form here. You'll have to follow the instructions from the email from Launchpad and login after your account is created. If you have a web email account like me then you'll have to do something extra to read the Launchpad mail. It will be encrypted, so you'll have to decrypt the contents. Open up the email and copy the contents. It looks like gibberish, I know. Just copy it and paste it into a new text file. Easy way to do it is to right-click your desktop and click on Create Document > Empty File. That will create a file on your desktop named 'new file'. Now you can rename that or not. Your choice. What did though was remove the spaces from 'new file'. Paste the contents of the Launchpad email in there and save it. Then type this in the terminal:

$ cd Desktop
$ sudo gpg --decrypt newfile

If you renamed the file, replace 'newfile' above with the filename you used. You'll be asked for your GPG passphrase. Voila! The decrypted email contains the link you need to go to to complete the registration process.

Once you're logged in to Launchpad, you'll see your username hyperlinked on the upper-right corner right next to the Log-out button. This will take you to your account options. Once there, you'll see a bunch of details you can fill-out on the right sidebar. For the matter at hand, you're interested in editing your OpenPGP Key. Clicking on Edit OpenPGP Keys will take you to where you can 'tell' Launchpad your OpenPGP Key by entering your OpenPGP fingerprint. How do you find your fingerprint? Type this in the terminal:

$ gpg --fingerprint ########

where ######## is your key. You'll see a long string of numbers and letters labeled as key fingerprint. Copy that and paste it into the Launchpad form. Hit the Find and Import button. After that's done, you'll be able sign the Ubuntu Code of Conduct.

To sign it, you have to download it. You can to do that from here: After you've downloaded the text file, sign it by going back to the terminal and typing:

$ sudo gpg --clearsign UbuntuCodeofConduct-1.0.txt

Doing so will change that same file into UbuntuCodeofConduct-1.0.txt.asc, which means the file's content is already 'wrapped' with your OpenPGP key. Open it, copy the contents and paste them into the form located here then hit the Add button. After that, you're done. You've signed one of the more important documents you'll ever sign online. Welcome to the community, Ubuntero! :-)


Copyright © 2011 Tech Throes | Splashy Free Blogger Templates with Background Images, Trucks