29 June 2009

Quick enable passwords for svnserve

I sure love Subversion. What a great tool. But, I'm more a user than an administrator of it. So, when I went to set-up another of my own repositories, I couldn't remember squat about how I'd done it before. I do recall there was a lot of reading involved. (With great power comes ... longer manuals. :p) First, you must create the new repository with a command like this, "svnadmin create /svnrepos/brandnew". And, in this case, the part that's difficult to remember is how to enable net access and password protection. So, here's the short answer, diff'd from my previous effort:
# diff /svnrepos/someapp/conf/ /svnrepos/brandnew/conf/
diff /svnrepos/someapp/conf/passwd /svnrepos/brandnew/conf/passwd
> kace = s3cret
> jack = pr1vate
diff /svnrepos/someapp/conf/svnserve.conf /svnrepos/brandnew/conf/svnserve.conf
< # anon-access = read < # auth-access = write --- > anon-access = none
> auth-access = write
< # password-db = passwd --- > password-db = passwd
< # realm = My First Repository --- > realm = main

... And, yes, it's done per repository. After making changes like the above to the configuration files for the new repository, you just need to start (or restart) svnserve. On FreeBSD, that should be as easy as "/usr/local/etc/rc.d/svnserve start" (... with "svnserve_enable='YES'" already in "/etc/rc.conf"). ... Also, you must have either created an 'svn' user or set another user to run the server as -- again using shell variables in "/etc/rc.conf", as per the appropriate variables found in the start-up script. ... Yeah, and you probably want to run something like "chown -R svn /svnrepos/brandnew" on your new repository so the svnserve process can actually make changes to it.

Details, details. Anyway, those configuration files were the part that took some research. Enjoy.

Labels: ,


Post a Comment

<< Home