Monday, December 19, 2005

CVS server on Ubuntu

Install CVS files:
sudo apt-get install cvs

Install the CVS server:
sudo apt-get install cvsd

When prompted in the cvsd installation process for Repository, type in “/cvsrepo”.

Now that the cvsd installation in complete goto /var/lib/cvsd

or seeking for a change(or if there is a new version of cvs updated):

sudo cvsd-buildroot /var/lib/cvsd

If the folder cvsrepo does not exist, then create it ..
sudo mkdir cvsrepo

sudo chown -R cvsd:cvsd cvsrepo

and then initilize the repository
sudo cvs -d /var/lib/cvsd/cvsrepo init

create a user and password

sudo cvsd-passwd /var/lib/cvsd/cvsrepo +username

sudo vi //var/lib/cvsd/cvsrepo/CVSROOT/config

Change "SystemAuto=no"


cvs -d :pserver:username@localhost:/cvsrepo login

cvs -d :pserver:username@localhost:/cvsrepo checkout .


At 1:45 AM, Blogger mohan said...

Thanks for nice instructions

At 1:05 AM, Blogger mitjab said...

nice howto, just one problem.

i want to add files in cvs that others can DL.
How can i do this?


At 3:10 AM, Blogger firebadger said...

I tried to follow these instructions, but when I run...

cvs -d :pserver:alan@localhost:/cvsrepo login

I get...

/cvsrepo: no such repository

Anybody any ideas?

At 1:29 AM, Blogger leon said...

have the same problem.

when I do
apt-get install cvsd
forgot to type /cvsrepo

I tried to apt-remove cvsd
rm -r /var/lib/cvsd

and try reinstall cvsd with
apt-get install cvsd

it does not ask me for repository directory again

nrecognized auth response from localhost: cvs [pserver aborted]: /cvsroot: no such repository

can any one help? Thanks!

At 1:56 AM, Blogger leon said...

use apt-get remove --purge cvsd

and redo the whole stuff

it worked!

Thanks to the excellent post!

At 11:02 AM, Blogger minoztro said...

deben utilizar dpkg-reconfigure cvsd

esto funciona :-)

saludos desde Chile

At 1:35 AM, Blogger carlitos.10040 said...

You do not have to reinstall.
Just change or add the last line in
/etc/cvsd/cvsd.conf to reflect your repo(s).

sudo vi /etc/cvsd/cvsd.conf
Go to the end of the file.

Repos /cvsrepo1
Repos /cvsrepo2

then restart cvsd
sudo /etc/init.d/cvsd restart

- Carlitos :]

At 8:08 PM, Blogger Micheál Healy said...

Great guide - nice and simple.

One thing:
Change "SystemAuto=no"
should be:
Change "SystemAuth=no"


At 11:24 AM, Blogger Suresh Patel said...

I'm not one to normally comment but I wanted to express my gratitude for these simple and straightforward instructions. I don't know for how long I have gotten the "No Such Repository" error. The instructions and followup comments helped me to resolve my issues.

Thanks SKP.

At 4:57 PM, Blogger babltiga said...

As i understood you must add cvsrepo to your /etc/cvsd/cvsd.conf file, to access it by pserver

At 1:00 AM, Blogger wang liang said...

Very simple and easy guide! Thank you.

But it reports "permission denied" error when I try to commit files:

cvs commit: failed to create lock directory for `/cvsrepo/CVSROOT' (/cvsrepo/CVSROOT/#cvs.history.lock): Permission denied
cvs commit: failed to obtain history lock in repository `/cvsrepo'

cd /var/lib/cvsd/cvsrepo
sudo chown -R cvsd:cvsd CVSROOT/

I guess you should init respository before change owner:

sudo cvs -d /var/lib/cvsd/cvsrepo init
and then initilize the repository
sudo chown -R cvsd:cvsd cvsrepo

At 3:33 AM, Blogger reinhardt1053 said...

Thank you

At 1:51 PM, Blogger lisney said...

This comment has been removed by the author.

At 3:39 AM, Blogger Toimitusjohtaja said...

Yeah. Very good instructions.
Still does not get me anywhere.
Tried everything, I still get:
> cvs login -d ":pserver:me@myrepo"
cvs login: can only use `login' command with the 'pserver' method
cvs [login aborted]: CVSROOT: me@myrepo"

And yes, all cvs commands work if I leave the ":pserver:" out from cvs commmand, so CVSROOT variable is correct.

~ ps -ef |grep cvs
cvsd 20386 1 0 21:44 ? 00:00:00 /usr/sbin/cvsd -f /etc/cvsd/cvsd.conf

At 2:56 PM, Blogger zooplah said...

With all these problems, it makes you wonder why you don't just use SVN:
svnadmin create .
svnserve -d -r .

At 9:59 AM, Blogger Nick said...

Excellent walkthrough very simple to follow. I appreciate that is was so easy. Well done.

At 9:09 AM, Blogger Debankur said...

This comment has been removed by the author.

At 9:11 AM, Blogger Debankur said...

After going through the steps I am still getting the following error:

cvs login: authorization failed: server localhost rejected access to /apps/cvs for user

This has started after some recent cvs update in herdy heron

Any idea?

At 1:52 AM, Blogger Petr Effenberger said...

Perfect walkthrough,

If you are running Jaunty Jackalope (or next versions when they come)
you may encounter error connection refused when trying to connect.
Main cause is different security in new version of system.

Fix: edit config for cvsd

sudo gedit /etc/cvsd/cvsd.conf
change line: Listen * 2401
to this: Listen 2401

then just restart cvsd:
sudo /etc/init.d/cvsd restart

At 8:46 AM, Blogger Johan said...

Thanks for this tutorial, special thanks to Petr for that "connection refused" fix for Jaunty!

At 3:52 PM, Blogger Hans said...

Thanks for the guide. I am totaly new to ubuntu and CVS. I get the following message when i follow the instructions.

hans@hans-desktop:/var/lib/cvsd$ cvs -d :pserver:peter@localhost:/cvsrepo login
Logging in to :pserver:peter@localhost:2401/cvsrepo
CVS password:
cvs [login aborted]: connect to localhost( failed: Connection refused

What am i doing wrong?

Regards Hans

At 3:56 AM, Blogger Balázs Cziráky said...


If your cvs repo folder is "/var/lib/cvsd/cvsrepo", than the last lines of your config file "/etc/cvsd/cvsd.conf" should look like this:

Listen 2401
Repos /cvsrepo


At 3:15 PM, Blogger kaku said...

when i m taking checkout i m getting below error

root@cvstest:~# cvs -d :pserver:nikhilv@localhost:/cvsroot checkout external
cvs server: cannot find module `external' - ignored
cvs [checkout aborted]: cannot expand modules

kinldy help

At 3:49 AM, Blogger Claudio Bazan said...

after reading so many tutorials, without a doubt is the best I read and left everything working to perfection.

thanks for everything ;)

At 10:25 AM, Blogger Agana-Nsiire said...

I get cvs
[login aborted]: connect to localhost( failed: Connection refused

What have I done wrong, and what can I do?


At 6:53 PM, Blogger Ishita said...

same problem as above...
connection refused!

At 10:51 PM, Blogger Rolland J Enoch said...

In my installation: I got an error during checkout.

Fatal error, aborting
cvsd: no such system user

I did the following copy:

cp -ar /lib /var/lib/cvsd


then it worked.


Post a Comment

<< Home