I tore my hair out over this for quite a while yesterday. Hopefully this might help someone else (and as a reminder to my self if I ever need to do this again). Ideally I wanted the following scenario:
– developer account ‘hamish’ who can read/write to the cvs server
– an anonymous account ‘anon’ who can only read from the cvs server
I wanted the developer accounts to connect with ssh and anon via pserver, however…this seems like a mission! Perhaps this is why sourceforge (who do it this way) have a horrible delay between the developer and anonymous servers – maybe the 2 schemes wont cooperate nice and easily!?
Anyway, so I decided to use plain old pserver for both developer and anonymous account. This made my life a lot easier, and I’m not that paranoid about security :)
Anyway, here goes…
1. Install cvs and cvsd
apt-get install cvs cvsd
When configuring cvsd I was asked which repositories to serve. I typed ‘/cvs’.
This means my repository will be available at cvs.myserver.com/cvs
2. Initialise the repository
cvs -d /var/lib/cvsd/cvs init
add the following line in /var/lib/cvsd/cvs/CVSROOT/config:
3. Allow write access to repository
chown cvsd:cvsd /var/lib/cvsd/cvs
4. Allow history file to be written
chown cvsd:cvsd /var/lib/cvsd/cvs/CVSROOT/history
5. Add developer use account
cvsd-passwd /var/lib/cvsd/cvs hamish
6. Allow developer to write to repository
echo “hamish” > /var/lib/cvsd/cvs/CVSROOT/writers
7. Setup anonymous account
cvsd-passwd /var/lib/cvsd/cvs anon
That’s it! Good luck!