Inside Out

Notes on seeking wisdom and crafting software

Accessing CVS behind firewall

Most firewalls block access to port 2401 (the default port for anonymous cvs access). In such case, to access to cvs either you can use SSH tunneling or a software like Tor or cvsgrab.
Cvsgrab tries to download the files using the webinterface of the cvs repository (either ViewCVS or ViewVC etc). And you get the whole code from cvs with the port 80 itself. However you cannot commit code into the cvs repository using this tool. It can also generate patches based on the remote code (cool ‘eh).
Here is how you set it up :

  1. Get the cvsgrab tar gzipped file from sourceforge or the latest snapshot from here. If you plan to use cvsgrab with sourceforge then get the snapshot from the second website.

  2. Decompress the archive and set the CVSGRABHOME environment variable using:
    export CVSGRABHOME="/path to cvsgrab directory"

  3. Make a link to the cvsgrab.sh file in CVSGRAB_HOME to your path. This can be done using :
    ln -s "path to cvsgrab/cvsgrab.sh" /bin/cvsgrab #do this as root

  4. Now just invoke cvsgrab in a terminal and check out the code in the following way :
    cvsgrab -url http://www.cvs.mysite.com/myapp -packageDir mypackageFor other options see cvsgrab -help

Technorati Tags: cvs, viewcvs, cvsgrab, firewall, ssh