Thursday, November 5, 2009

Uploading brances from launchpad

Launchpad now a days is the online mall for open source projects so this section is dedicated to explain the process to upload a branch from launchpad .


First you need to create your account at www.launchpad.net by clicking register on top right


Creating the key

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

Linux/Cygwin

Step 1: Install OpenSSH. On Ubuntu, you can install OpenSSH by opening your terminal and typing:

sudo apt-get install openssh-client

With Cygwin you can follow the instructions here: http://pigtail.net/LRP/printsrv/cygwin-ssh.html

Step 2: Once OpenSSH is installed, stay in the terminal and type:

ssh-keygen -t rsa

Step 3: When prompted, press Enter to accept the default file name for your key.

Step 4: Next, enter then confirm a password to protect your SSH key. Your key pair is stored in ~/.ssh/ as id_rsa.pub (public key) and id_rsa (private key)

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

Windows (PuTTY)

Step 1: Download the PuTTY Key Generator from here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Step 2: Run puttygen.exe and click the generate button. PuTTYGen will ask you to move your mouse around in the blank area to generate entropy.

Step 3: Set a key passphrase and confirm it.

Step 4: Click "Save public key" and choose a location to save it. Click "Save private key" and choose a secure location to save it. You must keep this secret key safe!

Step 5: Do not close Puttygen window just yet! Copy the public key from the Puttygen window.

This way you get key for the next step ("Registering the key with Launchpad").

Note: Step 5 helps avoid the "Invalid public key" error. (Taken from launchpad question 26705)

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 the value 'plink'

Step 3: Close all existing bash terminals and open a new terminal.

Step 4: Run 'plink INSERT_YOUR_USERNAME_HERE@bazaar.launchpad.net' and accept 'yes' to store the server's host key

Registering your personal computer with launchpad id to inform bzr of your Launchpad ID


Example :

bzr launchpad-login maansatyamitra-yahoo

If you don't know your log in the surf it at

http://launchpad.net/people/+me


Uploading a branch


for some projects you can directly upload the branch with out being registered but you may be deprived of it many times specially restricted ones .

example :

bzr branch lp:~openerp-commiter/openobject-addons/stable_5.0-extra-addons