Friday, October 12, 2012

Pulling data from launchpad repository even if SSH is not available

    All the curses that English language has to offer will not be enough to calm me when I think of my college's network administrators. You can see in their faces that whatever you request them to do, their answer is going to be NO. No matter how much I requested them, they did not allow me SSH access to outside world :(
    Here's what my problem is: I contribute to open source projects which have code on launchpad and I use bzr to manage my code. Now since SSH is blocked I am unable to pull/push (get/send) code to the launchpad server.
    At first I thought of tunneling SSH over HTTP but then I realized that it would require configuration over both Launchpad and my side. Now obviously Launchpad would not make changes to it's server just because some network administrator is harassing students. So I went over the #bzr IRC channel on freenode (for solving a doubt, first comes Google and then comes IRC). As expected I got a solution for my problem. Though the solution was a partial one as it only solved my problem of pulling data and not pushing data. Anyways, here is the solution that they suggested.
   remove 'launchpad_username' from bazaar.conf and deleting the section of authentication.conf This will make bzr use HTTP link. Ignore bzr telling you that you are not logged into launchpad.
   It will behoove you to keep the old versions bazaar.conf and authentication.conf as you will need the details when you push the code. Now it will be irritating to move back and forth between the 2 configuration files but hey! at least you are getting up to date code! You can of course write a shell script to do this task for you :)