A little info on how to use cvs

Here I just want to give you a few pointers on how to use cvs. The general information about how to use cvs can be found in the info system that is used by most gnu tools. To access that you should do:
$ cvs info
when you have a reasonable cvs installation.

CVS at NADAs Computers

On computers maintained by nada a version of cvs is included in the gnu module, so you have to add that before you can use anything:
$ module add gnu

Other Unix Systems

For most Linux distribution there is some version of cvs available that is prepackaged. Install that, it should do the trick. If you don't have any prepackaged version, a source distribution of cvs can be otained from the CVS website:
There is also a cvs manual available and some other documentation that might be helpful if in doubt.


This is based on using the CygWin+Heimdal distribution provided by PDC and it worked on my Win2K box really well, how it behaves on other variants of Windows I don't know, try it out.

  1. Go to PDC's webpage on Cygwin and Heimdal and follow the instructions there.
  2. After opening the bash you should be able to buy forwardable tickets using kinit -f just like under normal unix.
  3. Try connecting to faun.nada.kth.se with rsh:
    rsh username@faun.nada.kth.se klist -f
  4. Get the file cvs-1.11.5.zip from the CCVS download list which is a windows binary and unzip it on a location of your choice.
  5. Copy the file cvs-1.11.5.exe to cvs.exe either in the directory where it is or into some directory in your path. This is just that you can type cvs on the command line!
  6. Setup the environment variables so that everything works smoothly, in Win2k this kan be done under Advanced->Environment Variables from the System icon of the Control Panel. Set the Variable CVSROOT to the value mentioned below. At this time you might also want to change you path to include c:\cygwin\usr\heimdal\bin and the directory where you copied the cvs.exe file to. If you do not add the first directory to the path you will also have to set the variable CVS_RSH to the value c:\cygwin\usr\heimdal\bin\rsh.exe so that cvs can find the kerberized remote shell from the heimdal distribution. I recommend adding the directory to the path since then all the normal kerberos commandos work from the normal windows command line.
  7. Open a command window (cmd.exe or bash or whatever shell you like) go to a directory were you would like to have you working directory under, eventually buy some tickets with kinit -f and do
    cvs co www
    If everything is fine you should just have checked out the www module containing the pages you are looking at! Have Fun!

What is required by CVS

Basically CVS requires some access to the area where all the files lie, also called the Repository. This can either be done by mounting the filesystem or by remotly accessing it using some sort of remote shell or cvs's own client/server protocoll. I strongly recomment using remote shell to access the repository because mounting the filesystem might break automatic update and other scripts since these are then executed on the local computer which possibly has a very different environment. This might corrupt some of the files in the CVS (administrative) directories of the cecked out tree if that is supposed to lie on a different system (somehow I noticed that some backslashed had found their way into the public_html copy which promply gave errors when updating it on the UNIX machines from nada!). The client/server protocol (pserver) is unfortunatly not available because NADA has not setup that and setting up you own server gives headaches because kerberos tickets have finite lifetime.

Once you have decided on how to access the repository cvs needs to know where to look for it. It does this using the CVSROOT environment variable. Actually this is only needed on new checkouts, because CVS stores the repository in the file Root in the CVS directories that are created to hold administrative information in the checked out copy. This is actually a plain text file and if it should become corrupted you can try and fix it there. You can set the CVSROOT variable by the command:
$ setenv CVSROOT {value}
for csh-like shells (incl. tcsh) or for sh-like shells (incl. bash) using:
$ export CVSROOT={value}
It is preferably to put this in some initialisation file so that it gets automatically executed upon login or startup of a new shell. This are either ~/.bash_profile or ~/.bashrc for bash whereas the first is executed by login-shells and the other by non-login shells. For tcsh it is sufficient to set it in ~/.cshrc or if you sit on a nada computer you might also try ~/.environment. Windows users have a point and click interface somewhere hidden in the system console. I believe System Settings->System->Environment where one can set the environment variables. On all of the above system you should be able to check the contents of the CVSROOT variable by using:
$ echo $CVSROOT

Connecting using kerberized rsh

This is the method I can warmly recommend, because it causes the least trouble since all the scripts are executed on the server side. As preferred server I would recommend faun.nada.kth.se which seems to have a fairly good setup, my.nada.kth.se seems to have some issues with kerberos tickets.

First of all you will need a kerberized version of rsh. Best would be a Heimdal version so you probably want to get a heimdal package for your favorite flavor of Unix, most major distributions should have a package for that or you check out the Heimdal homepage at http:://www.pdc.kth.se/heimdal/ or one of the tavelkits provided at http://www.pdc.kth.se/support/kerberos-travel-tour.html . Unfortunatly the latter source is for kerberos V4 which might have some issues with accessing the forwarding the tickets.

The you will have to set up your CVSROOT to point to the location of the repository, replace username with your username to log into kth:

Check that you have access to faun.nada.kth.se and that the cvs program is available:
$ rsh username@faun.nada.kth.se which cvs
which should give you some location of the cvs binary (e.g. /pkg/cvs/1.11p/bin/cvs). If that is not the case you should do a module add cvs in your ~/.module file on faun.nada.kth.se. Furthermore you should check that you got tickets on the remote site by using:
$ rsh username@faun.nada.kth.se klist -T -f
When that has succeeded you can try to check out the www tree from the repository by doing:
cvs co www
Which should give you a copy of the web-pages you are currently reading.

Some important CVS commandos

This gives you the most basic cvs commandos that are used during the basic workflow. Please consult the manual for more details!

$Id: cvs-howto.html,v 1.4 2003/02/21 03:44:40 noname Exp $