Your own private CVS repository

To think I’d tried to set upon the path of setting up a CVS server a few weeks back to allow me and several friends sharing a dedicated server to have our own private CVS repositories. The approach I took was to setup the server for password authentication (pserver). Naturally, I failed to get it running (had some issues with xinetd), and had given up since. Little thought did I give to alternative ways of setting up a CVS repository, and probably the most common sense way, using RSH - specifically, SSH, to connect. Well, that worked, and it was amazingly simple to do too.

I’m going to assume you have a shell account to your webserver accessible via SSH. Also, your server should have the cvs client installed - you can test it by logging into your shell account and typing ‘cvs -v’, whereupon it should print the CVS version and the usual blurb.

Now, my server is codefront.net and I have a user account chuyeow. First, I’d have to create a repository on my server. I do that by logging in to my shell account (using SSH) and creating a directory where I’d have read-write access. The simplest place is to create a directory in your home directory (mine’s /home/chuyeow).

$ mkdir /home/chuyeow/cvsroot

Create the CVS repository:

$ cvs -d /home/chuyeow/cvsroot init

There I’m done! I now have a CVS repository that’s accessible from any location so long as I have a SSH client and a CVS client.

To access my repository, I’d first have to set my CVSROOT to :ext:chuyeow@codefront.net:/home/chuyeow/cvsroot, and the CVS_RSH environment variable to “ssh”. I do that by entering these lines below into my ~/.bashrc file.

export CVSROOT=:ext:chuyeow@codefront.net:/home/chuyeow/cvsroot
export CVS_RSH=ssh

Now, all that’s left to do is to import my existing sources into the repository:

$ cvs import -m “Imported sources” sources_dir vendor start

That’s it! You can checkout a copy and then do CVS checkins, merges, etc. as you normally would from now on.

3 Comments & TrackBacks (Add yours)

The paper doll icon that precedes each comment is an idea conceived by Vanessa Tan.

Paper doll icon
Vinny Carpenter's blog's Gravatar

CVS for dummies
Just found a great blog entry by Chu Yeow entitled Your own private CVS repository via Matt’s blog. In this blog entry, Chu Yeow walks you through creating a simple CVS repository and accessing it via. SSH without the need of setting up the CVS serve…

Posted by: Vinny Carpenter's blog on June 3, 2004 8am

Paper doll icon
arjenvr's Gravatar

I was looking in to this just yesterday. Problem is, my hosting account doesn’t have cvs installed. The way I see it, there’s two options, none of which I know the actual solution to:

  1. Install a precompiled CVS binary (i’d have to find one that works on Redhat/Fedora) — if that is at all possible
  2. Find a way to access the filesystem on my account as a network share, via SSH (works on local network shares)

There must be a way to accomplish one of these options, anyone who knows how?

Posted by: arjenvr on June 4, 2004 6am

Paper doll icon
Tom's Gravatar

arjenvr: You should still be able to do this. Just fetch the binary(ies?) that you need and upload them to somewhere that’s in the default path on the server. I did this on my own web server that didn’t have cvs installed and it worked great.

Posted by: Tom on June 12, 2004 2am

You can subscribe to the RSS feed for comments on this post.

Post a comment

(required)

(required, but never displayed)


You can format your comments using XHTML. Your email address will not be displayed or used for nefarious purposes.

Only following tags are allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>