13

Setting up a CVS server on Mac OSX in 4 steps and 4 minutes

Posted November 27th, 2006 in OSX, Software by erich

So. I wanted to set up a cvs server under OSX. I looked around and found a few people with docs about how to set up xinetd or set up launchd, blah blah blah, but I didn’t want to deal with that. Yeah, I know OSX is unix and isn’t that great, but I want something like the old days where to install a web server, you just launched the MacHTTP app and you were done. No config files, just simple apps. Want a mail server? Fire up EIMS. Ah, the good old days…

So, as it turns out, it apparently _is_ simple to get cvs working under OSX. Here are the steps (from memory, so I might have missed something, but damn it’s simple)

  • 1) Insert OSX Install Disc 1 and launch the Xcode Tools / XcodeTools.mpkg installer, Continue, Continue, Agree, Continue, Customize, deselect everything except for the top item, “Developer Tools Software”. Finish the install
  • 2) Fire up Terminal and make a cvs-repository directory in your home directory (or wherever, but that’s what I used): “mkdir cvs-repository”
  • 3) Add required files to the cvs repository with “cvs -d /Users/erich/cvs-repository init”
  • 4) Open your System Preferences, Sharing, Services – make sure Remote Login is enabled
  • 5) There is no step 5

That’s it. I fired up Eclipse, made a test project, connected using the IP address (not by name, for simplicity) of the OSX box, connection type of “extssh”, repository path of “/Users/erich/cvs-repository”, and it worked. That was it.

Secure cvs, no pserver bullshit.

Almost back to the old days. Way better than trying to set this up on Winders. But I can dream of a CVS.app someday, right? Are you on that? :-)

13 Responses so far.

  1. Dave Yost says:

    Nice of you to give people a cookbook, but you should also print in bold letters Do not use cvs. It is obsolete. I don’t yet have personal experience with other VCS’s, but everyone says that Subversion is now better, and many I know say Subversion is obsoleted by darcs, mercurial, and others.

  2. erich says:

    Have to disagree with you, Dave. CVS is old, simple, stable, and fast. Subversion is shiny and new, buggy (yes, it’s bitten me several times over the past year) and slooooooooooooow. Lordy it’s slow.

    I really don’t undestand the hype that’s following svn around. If you ask people what’s good about it, they tend to focus on atomic commits, which I haven’t found to be that useful except for the promise of miraculous branching and merging. Which works about 90% of the time. That last 10% hurts bad when it fails… yowch.

    There are lots of reasons to pick one version control system over another, and I encourage everyone to decide on their own. But for a very simple and reasonably reliable version control system that can be set up in 4 minutes, whether for use by yourself solo or with other people, CVS works great on OSX.

    Have fun, everybody!

  3. Etresoft says:

    CVS is not obsolete at all. Subversion is very difficult to install. It imposes its own directory structure on all your projects. Also, when people compare the features of Subversion to those of CVS, they always tend to use some ancient version of CVS. The people at March Hare have a very nice, open-source version of CVS that runs on all platforms and does everything that Subversion can.

    Erich is right. Pick your version control system based on what you like to use, not what other people are using.

    And BTW, Step #4 is optional.

  4. [...] Por principio de cuentas el sistema Mac OS X tiene la posibilidad de echar a andar un servidor de ese tipo, pero se requere de varios malabares a través de la terminal de comandos y otra serie de pasos. Sin embargo, alguien encontró un atajo y en unos pocos pasos se puede poner a funcionar: [...]

  5. Frank says:

    Thanks a lot.
    It cost me half a day of research, try&error, man pages, google etc. etc. Then I found this cookbook and voila: It’s really as simple as that :-)

    Frank

  6. Sven says:

    Thanks!!!!

    Agreeing to Frank, I spent quite a bit of time trying to set up repository on a external drive connected to my airport extreme.
    Followed the instructions in your cookbook and it was done in a few minutes.

    Cheers, Sven

  7. Rob says:

    Thanks for this! A couple of differences I found: 1) Xcode was on OS X Disc 2, not Disc 1 on my Leopard discs; and 2) Remote Login did have to be enabled, I did not find it to be optional as Etresoft noted.

  8. Andrew says:

    THANK YOU for the instructions…. i spent 2 hours scouring the web (ie googling) (and invented a few poetic swear phrases along the way) to find instructions on how to connect eclipse with cvs on a mac os x (leopard) because i was getting connection refused errors, and found nothing that worked… until this page! and all it took was a single check of the remote login in system preferences…. cool!

  9. Brandon says:

    I followed all of the instructions but I can’t seem to be able to connect.

    I’m on a LAN that uses a Time Machine as a router. Most of the time I’m directly plugged in. The server I’m setting up to host SVN is a G5 Tower dual 2 Ghz but if I could get it to run on the Time Machine, that would be even better.

    I’ll start with getting it to work on the G5. I followed all the steps in the documentation that Apple put on their developer website as well as verified the steps with this article but I can’t connect. I think it has something to do with the router, so I set up port forwarding to forward 2222 to 22 (ssh). In Xcode, I put 2222 into the port box. I setup user accounts from System Preferences->Accounts and tried various logins.

    I’m using DynDNS to forward a hostname to the IP that my G5 is using. I tried the hostname and the actual IP, no luck anywhere.

    I configured a similar setup with web sharing to forward port 8080 on the same hostname to the same computer and that works just fine. I don’t know why the repository isn’t working. :(

    Any help?

  10. Oliver says:

    Works – and is as easy as you wrote. Thanks a lot!

  11. chuck says:

    Hey Great Tip! Thanks.

    FYI, I had a bit of a problem getting Eclipse to connect to the server. After experimenting (also known as “clicking around”) I discovered that setting my connection type to extssh worked for me. (right click the repository in eclipse, choose properties, select extssh).

    –chuck

  12. Stefan says:

    Great! It’s really that easy. Unfortunately, your entry isn’t top of the list, if you google for “setup cvs eclipse mac os x”, so I lost almost two hours with other tips, that didn’t work.

    Thank you!

    Stefan

  13. Tim says:

    Thanks for posting this! It worked like a charm. I set up the CVS on my development mac and just used “localhost” as the host in the Eclipse CVS Repository setup wizard. BTW, step 4 WAS necessary for me unlike one of the commentors above.

Leave a Reply