Why you need an SSH key

The trust that other people put in your Launchpad identity is no more important than when they use code that you've uploaded to Launchpad.

An SSH key secures the connection between your computer and Launchpad while you're pushing Bazaar branches up to Launchpad.

To push code branches to Launchpad you first need to generate your SSH key. The key is made up of two parts: a private key that stays on your computer and a public key that you register with Launchpad. As you might expect, you shouldn't share the private key with anyone.

Creating the key

How you create your SSH key pair depends on which operating system you use.

Now you need to upload the public portion of your SSH key to Launchpad.

Possible Step 5: You may need to run ssh-add with the id file if you created an id file other than ~/.ssh/id_rsa. Do ssh-add /path/to/file/id_rsa_newfile . If you’re on the Mac, you can execute the following on the command line:

Step 6: Run/Install Pageant as either a standalone .exe or as part of the entire putty package. Make sure Pageant is running and rt+click the icon in the notification area. Add the private key you saved earlier. This step is crucial if you want to connect to launchpad from a Windows PC.

Cygwin/Windows (PuTTY)

Follow these steps if you wish to use Pageant under Cygwin.

Step 1: Follow the procedure in the 'Windows (PuTTY)' section

Step 2: Add 'BZR_SSH' as an environment variable with full path to the plink.exe or just 'plink' if it's in PATH anyway.

Step 3: Paste your public key into the text box and then click the Import public key button to continue.

Using a custom SSH key for Launchpad

You can safely use one SSH key per client machine to connect to multiple hosts. Some people choose to use a separate SSH keypair per service and per client, to have more flexibility about copying keys around or revoking them.

To do this:

You need to generate a key to a non-default name, perhaps id_rsa_launchpad (and .pub)

Upload that key to Launchpad, as described above.

You'll need to tell your SSH client to use this key. With OpenSSH, add these lines to your ~/.ssh/config file:

Host bazaar.launchpad.net
IdentityFile /home/me/.ssh/id_rsa_launchpad
User launchpad-username # the short name that appears in the URL when you visit https://launchpad.net/~

Note You need to upload the .pub file to Launchpad, and to specify the private-key file (with no .pub) in the SSH configuration.

Next step

We're almost done setting up your Launchpad account! Before we explore more of Launchpad, let's look at one of the ways it helps other people to see your involvement in free software: karma!