Following the previous posts in this category you will notice that I was using as the code hosting. We had to change that because we really didn’t want to share every bit of code. ( A big sorry to open source developers. I am truly a sell out. ) So had to set up CVS server. Never done that before. Should probably add it to my CV. Anyways to business.

How to set up a CVS server using SSH :

Step 1 : Install CVS to Fedora. My Fedora distro came with CVS since I chose developer properties during installation. However you may not have it to install simply say;

sudo yum install cvs

Step 2 : Create a cvs user and group! Just follow the code below;

useradd cvs
groupadd cvs
mkdir /home/cvs
cvs -d /home/cvs init
useradd cvs
groupadd cvs
mkdir /home/cvs

Step 3 : Set permissions and add /home/cvs directory to cvs by using the following;

cvs -d /home/cvs init
chown -R cvs:cvs /home/cvs
chmod -R 770 /home/cvs
chmod 700 /home/cvs/CVSROOT

Step 4 : Now you have to add your project to the CVS server. I assume you have a ~/project****directory on the server. Just follow the following commands;

cd ~/project
cvs -d /home/cvs import -m "Initial Import" project myname release
cvs -d /home/cvs checkout project

Step 5 : Add an account to the CVS server (preferably with the same username and password of the user acount you have created for the CVS server that will connect through SSH.) Use the following by replacing and

echo "<username>:<password>" >> /home/cvs/CVSROOT/passwd

Step 6 : Make sure you have created a user to connect through SSH give him CVS group permission.

And that is that. It should work. Though you may need to do some changes in Step 3. To connect you can simply use the following code or just use Eclipse’s IDE ( that is what we are using. )

export CVS_RSH=ssh
cvs -d login
cvs -d co moduleName

I hope it will be helpful. Peace!