How to install CVS

From Cosmin's Wiki

Jump to: navigation, search

Home > Linux how to's > How to install CVS


I will describe here the few steps necessary for setting up a secure CVS (Concurrent Versioning System) server with OpenSSH. CVS source control allows multiple people to obtain source code, work on it and commit it back to a single central repository. For a longer and more detailed description of what CVS is and how to use it please read this article.

The setup I am working on is a Debian 5.0 box which I am accessing over ssh setup with a custom port and with a private key. A step-by-step description on how to setup OpenSSH for private key authentication on a custom port please read [this article]. Ok, let's start: first install the CVS server. As root, run

> aptitude install cvs
. This will install the CVS binaries which you can now use to create the repository for storing your code.

Next, create a cvs user and group and create a repository located at /home/cvs owned by cvs:

> useradd -m cvs
> cvs -d /home/cvs init
> chown -R cvs:cvs /home/cvs
> chmod -R 770 /home/cvs
 

Now any local account that needs to write to the repository should be added to the cvs group and will then be able to add and modify projects:

> adduser cosmin cvs


Restricting access Next thing you might want to do is only allow specific users (i.e. your developers) to write to the CVS repository. Easy enough. To allow only certain users write access to the repository, place their usernames in a file called writers in the CVSROOT module:

> cd /home/cvs/CVSROOT
> cat >> writers
cosmin
another_one
^D
> 
 

That's it. Your CVS server is all set up. For a set of basic commands on using the CVS server, please refer to the article I mentioned above.

When accessing CVS from a Windows box, I recomment using Tortoise CVS. I find it as an excellent CVS client for windows. Not only does it well integrate with WindowsExplorer, but also with Total Commander. Should you with to get the nice overly icons in Total Commander, you need to install the ShellDetails plugin from here. A description of the steps can be found in the TortoiseCVS help under Total Commander and TortoiseCVS.

Happy safe coding!