How to set up a cvs server on mac os x 10.3 pantherYesterday I set up a cvs server on my computer at home. I did so that my friend James can grab and update the source code for the pure java version of my risk game Lux (which he has promised to help me finish).
Since panther is still a pretty new OS it took some piecing together of steps from the web. Here are the full details for internet land...
The first step isn't really necessary, since cvs comes pre-installed on OS X 10.3. However since I already have fink installed it was trivial to update my cvs to a more up-to-date version. As a software developer myself I know that it is almost always a superb idea to be running as close to the bleeding edge as possible. Yeah, so I upgraded from version 1.10 to 1.11.5.
The next few steps come courtesy of this lovely webpage. They mostly pertain to OS X 10.2, so here are just the 10.3 steps:
Step 2 is to create a repository. The web told me that other people put theirs in /usr/local/CVS (or similar), so that's where I put mine. The cvs protocol will only work if everyone can read/write the repository, so the permissions must be set up as well (it's possible that this could be a security risk, depending on your setup. I had to do it for cvs to work properly though: use at your own risk)sudo mkdir /usr/local/CVS/ sudo cvs -d /usr/local/CVS/ init sudo chmod -R a+rw /usr/local/CVS/ Step 3 is to modify xinetd to run a cvs server. Create the file /etc/xinetd.d/cvspserver and paste this into it:
service cvspserver { disable = no socket_type = stream wait = no user = root server = /sw/bin/cvs server_args = -f --allow-root=/usr/local/CVS pserver groups = yes flags = REUSE }
If you are using the built-in cvs instead of fink's the it should be 'server = /usr/bin/cvs' instead'
Step 4 is to restart xinetd so that the cvs server vars we just created get loaded. Do it by typingsudo kill -HUP `cat /var/run/xinetd.pid` Step 5 is new to panther systems. Because some sort of ShadowMasking for passwords is now used. So create a file called passwd inside you CVSROOT. In our case it would be /usr/local/CVS/CVSROOT/passwd Inside of this file you must put the account names and encrypted passwords for your cvs users in the form of 'user:encryptedpass'. In order to get the encrypted version of the password you can run the command:perl -e 'print crypt "password", "sa"' Where 'password' should be replaced with the password you want to use and 'sa' can be any two letters.
Whew. That's it. Hopefully it will be useful to somebody. Many thanks to the web for having all the info (albeit scattered all over the place). After all of this people should be able to connect to your cvs server using:pserver:username@domain:/usr/local/CVS (As long as you change 'username' and 'domain' to be the proper values of course)
25 comments I am running on a clean install of Panther (I have got this to work under 10.1/10.2 and inetd) but now get an $1: unbound variable when trying to start xinetd for the first time.
Anyone? | |
Thanks so much for the Panther CVS info. I was pulling my hair out trying to configure it with Jaguar instructions...phew! | |
Is it just me, or have the instructions disappeared? I'm trying to set up CVS pserver on 10.3
The instructions seem to have been dropped, ending at "here are the full details for internet land..." Doh. | |
problem fixed, the instructions are now back up | |
Sweet. Thanks, dustin! I'll run the install first thing tomorrow morning! | |
After hours and hours of "work" I finally landed here, but this doesn't work for me as well. The password scheme seems to be different although I use Mac OS X 10.3.2 server. The following combination works in the passwd file: stephan:2Sqf7taLEYgp2 (password is stephan), but the one generated by the perl script won't (neither does the one produced by htpasswd). Any idea what I'm doin wrong? Or is there a way to use the already available users from NetInfo? | |
I can't log in with the Perl generated password either (running 10.3.2 with Developer Tools installed). | |
This script did the job for me: http://www.faqs.org/docs/ldev/0130091154_201.htm
#!/usr/bin/perl # # Simple script to take a username and password and # return a line suitable for pasting into the CVS # password file. #
($u, $p)=@ARGV; @d=(A..Z,a..z); $s=$d[rand(52)].$d[rand(52)]; print $u.":".crypt($p, $s).":cvs\n"; | |
Thank you for the 10.3 instructions ... I had almost given up | |
Very nice work. I was able to get CVS up and running in less than 5 minutes. | |
Perfect, this is what I was looking for, worked perfect, up and running in 10 minutes. (thank you internet gods!) | |
Worked like a champ on 10.3.3. Thank you very much! | |
Thanks for this round-up. I was having plenty of trouble before I found your site. Now it is working fine. The other information even on the cvs site or maxosxhints is out of date! | |
This did not work right away for me because of the way I was accessing the cvs server via ssh tunnelling from my WinXP machine.
I access it using cygwin command line.
I had to change: (1) ssh -L 2401 localhost:2401 to (2) ssh -L 2401 127.0.0.1:2401
in order for me to gain access to my cvs server.
Line (1) worked with the cvs server on Jaguar, but not after I upgraded to Panther.
After the upgrade, when using line (1) I got the following error messages:
channel 2: open failed: connect failed: Connection refused.
and
cvs [... aborted]: reading from server: Connection aborted | |
Thanks so much for your help! | |
I am also having trouble from Windows, I followed these instructions as well as implementing the ssh server piece. I can now see the repository from a client, but cannot do anything without connection refused or in the case of an import it can't create the remote directory. | |
Wish this was working for me under 10.3.6 - I can do a non-pserver login but not via pserver. Ive tried all the suggestions for the password file to no avail. | |
I followed the instructions, but I cannot login for some reason. I get "cvs [login aborted]: connect to :2401 failed: Connection refused"... How can I tell if xinetd is running? | |
Working on 10.3.5 All instructions are followed but no results. The client cannot access the server either using non-pserver or pserver login. The error code got is 116 using the client and using the command line cvs client I get an error: no such repository even if the repository exists. | |
People who have had a problem with the password (like me, I'm on 10.3.9) might want to see this page http://www.hutten.org/bill/eclipse/. I used the openssl method and either that or putting a second 'execution' name at the end of my passwd file did the trick. | |
Sames as Jeff S, tried this config, plus instructions at developer.apple.com, but cannot get cvs working.
Connection is always refused, xinetd is running, before you ask | |
i have MAC 10.3.9 here..n i am trying to setup a CVS server in it..i followed the instructions, but am not able to login...it is saying connect to 2401:failed: connection is refused all the time..can u tell me how to make the port listen to the cvspserver.. | |
|
|
|
|
Vorg — Tag Cloud
Written by dustin Latest PhotoQuote of Now:FriendsPopular PostsComputer Games
|