Dreamhost Subversion and .htaccess Authentication


#1

I’ve installed WebSVN to work with Dreamhost’s auto-SVN repo installer. Unfortunately for my case, one of the repos (currently only one, actually) will need to be password protected.

I’ve tried to follow the instructions in the Wiki:
http://wiki.dreamhost.com/Talk:WebSVN

…but I don’t completely understand the step of “Use the panel to make a restricted htaccess file. Add all the users you might want regardless of repository.”

Does this mean that I would have to manage both the htaccess file and the authentication of SVN separately? Isn’t there a way to link all of the files - AND to do it so that the index view of WebSVN isn’t protected, but the subdirectories (project repos) are protected as they should be?

Thank you.

  • Brendon Kozlowski

They say, “Practice makes perfect,” yet they also say, “Nobody’s perfect”. I don’t get it.


#2

If you want to use the same usernames/passwords as you’re already using for SVN, that’s definitely possible… you’ll just have to set up the .htaccess yourself. There’s a password file in ~/svn/repositoryname.passwd which you can point to:

AuthType Basic AuthName "SVN" AuthUserFile /home/username/svn/repositoryname.passwd Require valid-userOr something like that.


#3

Actually I already noticed that and have done that. The problems I see with that approach are:

  1. WebSVN accesses all repositories from a single file, so if you use htaccess with a single htpasswd file, you’re essentially blocking access to the main page with that user/pass setup before even choosing a project.

  2. If you have multiple repos, all with different access rights, you’d have to simply pick one that overrides control of the others, regardless…or setup multiple installs of WebSVN.

So there really isn’t a single location that defines properties of all of the repos?

They say, “Practice makes perfect,” yet they also say, “Nobody’s perfect”. I don’t get it.