PDA

View Full Version : CVS SERVER over SSH


KhAjUr
20th August 2006, 06:56 PM
I am going bananas over this for the last 1 month.
I am trying to set up a CVS server on FC5 so that I can sync my projects over ssh.

I read a number of tutorials online, 1/2 of them contradict each other, and using most common ones, I am having authentication failures, this or that.

Has anyone successfully set one up?
guidelines.

Thanks

emamm
21st August 2006, 02:08 AM
Hello there

Yes, I have. I used it every day.

Please take a look at my web page (http://www.cpdee.ufmg.br/~emmendes/HowtoCVs.htm) for some guidelines and add the following lines to your .bash_profile

CVS_RSH="ssh"
CVSROOT=":ext:eduardo@xxx.xxx.xxxx.xx:/home/eduardo/my_versions"
export CVS_RSH CVSROOT

You will have to change the lines according to your setup.

I hope it helps ....

Cheers

Ed


PS. Pardon my English!

chepprey
28th August 2006, 01:24 AM
emamm - you explained how to use a cvs CLIENT... but the question is about how to configre a fc5 machine to be a cvs SERVER.

I too am very much curious about how to do this. FC5 seems weirdly different than other systems when it comes to setting up services to run. Where the heck is xinetd? It's not even running on my fc5 server. How do services get routed from a connection to a port to the proper service daemon these days?

emamm
28th August 2006, 01:32 AM
Hello

I use FC5 to connect to my cvs server (which is a Mandrake 10 box). As far as I can remember I have just installed cvs-server on it without any specail configuration. Perhaps FC 5 wrecked cvs.

Sorry for not being of help.

Cheers

Ed


PS. My problem was how to get Tortoise (windows) to connect to the server but that works too.

wintersm
28th August 2006, 01:49 AM
i have had it working, but now have changed to subversion as its much better, anyway for cvs

ensure you have the packages cvs & cvsutils

make sure you have the file /etc/xinetd.d/cvs

# default: off
# description: The CVS service can record the history of your source \
# files. CVS stores all the versions of a file in a single \
# file in a clever way that only stores the differences \
# between versions.
service cvspserver
{
disable = no
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
# group = cvsuser
passenv = PATH
server = /usr/bin/cvs
env = HOME=/home/cvsrepo
server_args = -f --allow-root=/home/cvsrepo pserver
# bind = 127.0.0.1
}

- change /home/cvsrepo to where you want your repository..
restart xinetd

then you can connect to a cvs "pserver" on port 2401, which can be forwareded via cvs..

you might have to do some cvs username/password stuff, i have a script called cvspasswd which i got from somewhere, also read the cvs documentation on how to set this stuff up, thats where i learnt it..

or checkout subversion, its http/webdav based and eaiser to setup..

chepprey
28th August 2006, 02:14 AM
dang you guys reply fast :)

Found a couple things out...

If you want to use cvs over ssh, there is nothing special to set up on the server, other than (of course) ssh and cvs. Then you just have to get your client-side environment settings correct, including CVS_RSH=ssh, and CVSROOT=:ext:username@hostname:/the/cvs/repository/path

So, emamm - you actually were correct in what you told me to do. Fedora didn't wreck anything to make cvs not work... I was just dumb.

Well... kinda. Back in the day, I'd set up the "pserver" for cvs. A pserver environment is probably more suited more for a "local area network" installation of cvs - like a group of developers in a workplace.

To get the pserver configured on FC5, you need xinetd. I guess what might be different in FC5 is that it doesn't install xinetd by default. I guess all of the most popular daemons just simply listen directly on their respective port. ?? Maybe someone can point us to an FC5 design doc that talks about xinet vs inetd vs daemon-directly-listen-to-port.

In any case, xinetd IS still available for FC5 - just "yum install xinetd" and away you go.

Once you have that, then you can configure the /etc/xinetd.d/cvs file like wintersm described.

While you could theoretically use ssh to port-forward port 2401 & use pserver-based cvs, I don't see how that'd have any advantage to just using the ssh-only (no pserver) style mentioned above.

Thanks everyone.

davidyeo
11th September 2006, 05:03 PM
I read everything I can on this topic but for the last 1 week, I still have not been able to get CVS working on FC5. HELP ANYONE? My config are as follows :

/etc/xinetd.d/cvs

default: off
# description: The CVS service can record the history of your source \
# files. CVS stores all the versions of a file in a single \
# file in a clever way that only stores the differences \
# between versions.
service cvspserver
{
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
server_args = -f --allow-root=/usr/local/cvs pserver
}


/etc/services
...
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
...

cvs directory/subdirectories

drwsrwx--- 3 cvs cvs 4096 Sep 11 03:02 cvs

drwsrwx--- 3 cvs cvs 4096 Sep 11 22:36 CVSROOT

-rwsrwx--- 1 cvs cvs 495 Sep 11 03:02 checkoutlist
-rwsrwx--- 1 cvs cvs 696 Sep 11 03:02 checkoutlist,v
-rwsrwx--- 1 cvs cvs 760 Sep 11 03:02 commitinfo
-rwsrwx--- 1 cvs cvs 961 Sep 11 03:02 commitinfo,v
-rwxrwx--- 1 cvs cvs 990 Sep 11 22:36 config
-rwsrwx--- 1 cvs cvs 1192 Sep 11 03:02 config,v
-rwsrwx--- 1 cvs cvs 602 Sep 11 03:02 cvswrappers
-rwsrwx--- 1 cvs cvs 803 Sep 11 03:02 cvswrappers,v
-rwsrwx--- 1 cvs cvs 1025 Sep 11 03:02 editinfo
-rwsrwx--- 1 cvs cvs 1226 Sep 11 03:02 editinfo,v
drwsrwx--- 2 cvs cvs 4096 Sep 11 03:02 Emptydir
-rwsrwx--- 1 cvs cvs 0 Sep 11 03:02 history
-rwsrwx--- 1 cvs cvs 1168 Sep 11 03:02 loginfo
-rwsrwx--- 1 cvs cvs 1369 Sep 11 03:02 loginfo,v
-rwsrwx--- 1 cvs cvs 1151 Sep 11 03:02 modules
-rwsrwx--- 1 cvs cvs 1352 Sep 11 03:02 modules,v
-rwsrwx--- 1 cvs cvs 564 Sep 11 03:02 notify
-rwsrwx--- 1 cvs cvs 765 Sep 11 03:02 notify,v
-rwsrwx--- 1 cvs cvs 39 Sep 11 03:15 passwd
-rwsrwx--- 1 cvs cvs 649 Sep 11 03:02 rcsinfo
-rwsrwx--- 1 cvs cvs 850 Sep 11 03:02 rcsinfo,v
-rwsrwx--- 1 cvs cvs 10 Sep 11 03:16 readers
-rwsrwx--- 1 cvs cvs 879 Sep 11 03:02 taginfo
-rwsrwx--- 1 cvs cvs 1080 Sep 11 03:02 taginfo,v
-rwsrwx--- 1 cvs cvs 0 Sep 11 03:02 val-tags
-rwsrwx--- 1 cvs cvs 1026 Sep 11 03:02 verifymsg
-rwsrwx--- 1 cvs cvs 1227 Sep 11 03:02 verifymsg,v

passwd
davidyeo:encryptedpasswd:cvs

I login in as david ( in FC5, NOT davidyeo), which is a member of the cvs group. I opened a terminal and ...

[david@localhost ~]$ cvs -d :pserver:davidyeo@localhost:/usr/local/cvs login
Logging in to :pserver:david@localhost:2401/usr/local/cvs
CVS password:
cvs [login aborted]: unrecognized auth response from localhost: cvs pserver: cannot open /usr/local/cvs/CVSROOT/config: Permission denied
[david@localhost ~]$

chepprey
11th September 2006, 08:46 PM
I login in as david ( in FC5, NOT davidyeo), which is a member of the cvs group. I opened a terminal and ...

[david@localhost ~]$ cvs -d :pserver:davidyeo@localhost:/usr/local/cvs login
Logging in to :pserver:david@localhost:2401/usr/local/cvs
CVS password:
cvs [login aborted]: unrecognized auth response from localhost: cvs pserver: cannot open /usr/local/cvs/CVSROOT/config: Permission denied
[david@localhost ~]$


Although you're logged in as "david", you are specifying "davidyeo@localhost" in your cvs command.

Cvs is saying that davidyeo@localhost doesn't have permission to look at /usr/local/cvs/CVSROOT/config.

You said that "david" is a member of the cvs group -- but that's doesn't matter if you put "davidyeo@localhost" in your cvs commands.

Which local user account on your Linux server is the one you want to have cvs access? If it's "david", you need to say "cvs -d :pserver:david@localhost:/usr/local/cvs login"

davidyeo
12th September 2006, 02:12 AM
Previously I useddavid, for example cvs -d :pserver:david@localhost:/user/local/usr login. I got exactly the same error.

davidyeo is a development user I am defining in $CVSROOT/CVSROOT/passwd so thats

davidyeo:blahblahblah:cvs

Having the above line in $CVSROOT/CVSROOT/passwd, means as I understand that when I pserver as davidyeo, the system will login me in as cvs. Am I right?

chepprey
12th September 2006, 05:00 AM
Sorry, I don't know. I abandoned the pserver route & stuck with ssh.

The only other thing I can think of that's Fedora specific regarding permissions is SELinux. When I install Fedora, I always completely disable SELinux. I don't need the overhead or confusion when I'm the only person using my server.

Aja Photos on Instagram - Anxiang Photos on Instagram - Braila