The Absolute Minimum on Installing and Using CVS

These are the simple steps that I used to get myself up and running with CVS. They are the very minimum steps, with little in the way of explanation. Please refer to the many good resources on CVS for more detailed and comprehensive information:

  1. The Cederqvist Manual
  2. The Redbook Manual
  3. WinCVS Daily Use Guide: WinCVS is a GUI CVS client for Windows
  4. CVSGui
  5. The CVSNT Wiki: CVSNT is a CVS server for Windows NT
  6. DevGuy's CVS Information Helpful guide to CVS, including CVSNT installation
  7. SourceForge's Basic Introduction to CVS
  8. SourceForge's Introduction to CVS for Developers

Bear in mind that the CVS program consists of two main components: the server daemon/service, and the client. CVS can be used on a standalone machine such that the repository and the working-copy are stored separately on the same computer. In addition, it can be used over a network such that the daemon/server and the repository are on the remote machine and the client and working-copy (or sandbox) are on the local workstation. Network operations involve user names and passwords, so a variety of protocols, of varying levels of security are available.

Also see my notes on WinCVS.


CVSROOT is a core aspect of CVS, referring, in general to the location of the repository, and possibly the protocol used to connect to it. Be careful when using the word CVSROOT; it can mean the following different things:

The -d cvsroot option of the cvs command is used to indicate which repository to use. However, to avoid having to enter this with every CVS command, you can use an environment variable named CVSROOT (e.g.: export CVSROOT=/usr/local/cvsroot/ for Unix). If you have set such an environment variable, you can override its value temporarily (presumably to use a different repository) using the -d option.

For remote repositories, it is necessary to specify both the machine that holds the repository, and which protocol to use, in addition to specifying the repository directory. On the local computer, the CVSROOT variable contains at least the path to the repository, and may contain the following:

On Windows machines, the sspi protocol is convenient and secure. A typical CVSROOT in this case could be:

If you are not using a built-in protocol, you may need to specify the program CVS should use to connect to the server. This can be done by setting an environment variable named ‘CVS_RSH’ with a value corresponding to the name of the client program that supports the relevant protocol. On Windows clients, Plink.exe, which comes with PuTTY can be used for this purpose. Note that the directory path should contain forward slashes, even if both the client and server are Windows machines. A fuller example of a CVSROOT variable follows:

Installing CVS

The operations described next are performed on the machine that contains the repository. In the case of a networked system, this would be the server machine; the programmers work on their own workstations, using the CVS client to communicate with the repository.

  1. Create a directory to hold the CVS repository. This directory is called “cvsroot”, and is typically located in /usr/local/cvsroot/ or c:\cvs\cvsrepo\ on Windows.
  2. Make a group named cvsusers (edit /etc/group or use User Manager on Windows)
  3. Add the appropriate users to the cvsusers group (edit /etc/passwd)
  4. Change the owning group of the cvsroot directory to the cvsusers group (e.g. chgrp <cvsroot> cvsusers, not necessary on Windows)
  5. Change the permissions of the cvsroot directory so that the cvsusers group can write to it (e.g. chmod <cvsroot> g+w or right-click on the directory in Windows, and use the security tab to give Modify permissions to the cvsusers group.)
  6. Initialise the cvsroot directory with the command cvs init -d <cvsroot>.

Using CVS

Home About Me
Copyright © Neil Carter

Content last updated: 2007-01-05