Knowledge Base

How to configure the Concurrent Versions System (CVS)

This article demonstrates how to configure the Concurrent Versions System (also known as CVS). This process involves setting up repositories on the server, and configuring clients to access them.

About CVS

The Concurrent Versions System, more commonly known simply as CVS, is a distributed version control system that enables you to track multiple revisions of files and directories. It is installed on all A2 Hosting shared servers. Although its popularity has declined in recent years with the release of newer version control systems like Git and Subversion, it is still used for some projects.

This article only discusses how to configure CVS to work with repositories hosted on A2 Hosting servers. It does not explain all of the features or how to use CVS.

Creating a repository

To create a CVS repository, all you have to do is log in to your A2 Hosting account using SSH, and then type the following command:

cvs -d /home/username/repository init

Replace username with your A2 Hosting account username, and replace repository with the name of the directory where you want to create the repository (if the directory does not already exist, the cvs init command creates it).

 

Configuring a CVS client

You know how to create an CVS repository, but right now you can only check out and import files directly on the server. Clearly, you will want to set up a CVS client so you can work with repositories from another computer.

The exact steps to do this depend on the client computer's operating system. Follow the appropriate procedures below for your computer's operating system.

Microsoft Windows

TortoiseCVS is a Microsoft Windows-based client for working with CVS projects. The following procedure describes how to set up TortoiseCVS to access repositories on an A2 Hosting server:

 

  1. Download and install the TortoiseCVS client. You can download TortoiseCVS at http://www.tortoisecvs.org/download.shtml.
  2. Right-click on the desktop or on a folder, click CVS in the context menu, and then click Preferences. The TortoiseCVS - Preferences dialog box appears.
  3. Click the Tools tab.
  4. In the SSH parameters text box, type -l “%u” “%h” -P 7822.
    You must type the SSH parameters as shown, or TortoiseCVS will be unable to connect to the server. For security reasons, A2 Hosting servers use a different port (7822) for SSH.
  5. Click OK.

You are now ready to connect to a remote CVS repository on an A2 Hosting server. To do this, follow these steps:

  1. Right-click on the desktop or on a folder, and then click CVS Checkout. The TortoiseCVS - Checkout Module dialog box appears.
  2. In the Protocol list box, select Secure shell (:ext:).
  3. In the Server list box, type your domain name.
  4. In the Repository folder list box, type /home/username/repository. Replace username with your A2 Hosting account username, and repository with the path to the CVS repository.
  5. In the User name list box, type your A2 Hosting account username.
  6. In the Module list box, type the module (project) name.
    Alternatively, you can click Fetch list to obtain a list of modules from the server.
  7. Click OK. TortoiseCVS connects to the server.
  8. In the TortoisePlink dialog box, type your password, and then click OK. TortoiseCVS checks out the module files and copies them on your computer.
Mac OS X and Linux

Follow these procedures to configure a CVS client if the computer is running Mac OS X or a Linux-based operating system.

Step 1: Generating a key pair
Step 2: Configuring the SSH client to connect to the A2 Hosting server

To complete steps 1 and 2, follow the step-by-step procedures described in this article. After you complete these procedures, you will have a fully-functioning SSH client installation that authenticates to the A2 Hosting server using keys. You do not have to type a password to access your account on the server.

Step 3: Configuring the CVS client

The cvs command line client is often the quickest and easiest way to interact with CVS, although there are GUI-based clients as well. In either case, however, clients use SSH to access CVS. For security reasons, A2 Hosting uses custom port 7822 for SSH connections instead of the default port 22. Therefore, whichever CVS client you use, you must configure it to use port 7822 for SSH.

To do this, follow these steps:

  1. On the client computer, open the ~/.ssh/config file in a text editor.
    If the ~/.ssh/config file does not exist, create it.
  2. Add the following lines of text to the config file. Replace example.com with the domain name that hosts the CVS repository:
    Host example.com
    Port 7822
  3. Save the changes and exit the text editor.
  4. You can now use SSH to access a CVS repository hosted on your A2 Hosting account. For example, the following command demonstrates how to check out a project from a CVS repository on an A2 Hosting server.

    cvs -d :ext:[email protected]:/home/username/repository checkout project

    Replace both instances of username with your A2 Hosting account username, example.com with your domain name, repository with the path to the repository, and project with the name of the project.

More Information

For more information about CVS, please visit https://savannah.nongnu.org/projects/cvs.