Setting up CVS with pserver on Mac OS X 10.4 Tiger

Under the principle of eating one’s own dogfood, and in order to force myself to learn a few tools that remarkably few of my developers at work understand like CruiseControl, I’m taking a ride through setting up my own little pet project to do of all things keep track of employee comments I keep on a weekly basis so I have a history to refer to at review time.

For the first little part I need to get CVS up and running and I’m using this fellow’s site to get started. Not too painful, about 20 minutes and I had my CVS repository setup. Next is remembering the command lines to check in an intial test project.

Looks like the command to import a test project is:

cvs import -m "Test Project" test vendor-tag start

Turns out this doesn’t work right away, Apple has changed my default shell to bash of all things. Much more linux like I suppose. Have to move things to the bash profile. Not sure why they used tcsh in the first place, but I had gotten used to it, oh well, back to bash.

Anyway after running the command again:

cvs import -m "Test Project" test vendor-tag start

The repository is now created. So I have a CVS directory.

The next step is to setup remote access. Since I’m just running on my local network I’m just setting up a default pserver access.

Step 1 is to create the file


. The following text goes in there: (In my case it already existed from an earlier setup under 10.2)

service cvspserver
  disable = no
  socket_type = stream
  wait = no
  user = root
  server = /usr/bin/cvs
  server_args = -f --allow-root=/usr/local/cvsmain pserver
  groups = yes
  flags = REUSE

Step 2 is to restart xinetd. The wonderful Unix command is below that I always forget, -HUP something:

sudo kill -HUP `cat /var/run/`

Step 3 Add the username and encrypted password to a


file under the CVSROOT folder in the cvs repository: (Apparently this is new from Panther on and it works fine for me in Tiger)

sudo touch /usr/local/cvsmain/CVSROOT/passwd

Step 4 is putting in the

username:'encrypted password'

on each line of the file. I only needed to do one. And of course you don’t have the encrypted password so you can use a short perl one liner to get it:

perl -e 'print crypt "password", "sa"'


In the “password” field you simply replace it with your password. The “sa” clause is just some two letter expression, apparently used for the encryption process. This will print out the encrypted password something like:


which you can then add to the


file so that the first line should look like:



Step 5 you should be able to login now with the following command:

cvs -d :pserver:edgibbs@ login


As a final note it took about 30 minutes of tinkering and googling to get to this point where things worked. The key sticking point seemed to be the extra


file that had to be created and have an encrypted password in it. That seems to be new for 10.3 or 10.4 as back in the 10.2 days I didn’t need this step.