Setting up a CVS pserver on Debian

CVS is a versioning system which is free and extremely powerful. CVS allows you to access your code repository remotely using something called pserver. This is a brief explanation on how to setup a CVS pserver on a Debian Linux system. (Note: The reason this TechByte is specific to Debian is because we are installing Debian specific packages using apt.)

First, install CVS and the secure pserver package. In this case, we are making the chroot jail (which the pserver runs in) in /cvsroot. Please note that this is not your repository root.

mkdir /cvsroot
apt-get install cvs
apt-get install cvsd

During the configuration of cvsd it will ask you where your chroot jail root is. Enter /cvsroot. It will also ask you for the name of your repository relative to the chroot jail. You can call this anything, but in our case we'll just call it /main.

Now either copy an existing repository into the /cvsroot folder or create a new one. The folder must be named the same as your specified in the configuration (in our case /main).

cvs -d /cvsroot/main init

Now you need to add a user (or many users) who is allowed to access this repository.

cvsd-passwd /cvsroot/main +myuser

You will then be prompted to enter a password for that user. The last thing you have to do is give the cvsd user permission to the cvs repository.

chown cvsd /cvsroot/main

After you've done that, your CVS pserver is ready to go. Now, from a remote system (in our case it is running Debian), you can access the repository.

export CVSROOT=:pserver:myuser@mycvsservername:/main
cvs login

From this point on you can use the remote CVS repository just like a local repository. You just have to try and remember to logout when you are done working with CVS.

cvs logout

And that's it. You now have a fully functional remote CVS repository using pserver. For more information, check out our Basic CVS commands TechByte


Author: DPAK
Created: Sep 23 2005
Categories: CVS - Debian
TechByte #36

Warning: By visiting this site and/or by using any information contained herein, you agree to the Techbytes.ca terms of use.



Add a comment about this TechByte

If you wish to add a comment regarding this TechByte, please use the form below. Please note that by submitting comments using this form you are allowing all of the information submitted to be visible on this website. Any comments submitted using this form will only be shown on the website if they are approved by the administrators of this site. IF APPROVED, COMMENTS MAY TAKE SEVERAL DAYS TO BE POSTED.

Posted By: (Optional)

Comments:


Other TechBytes: