views:

5107

answers:

12

I have a VisualSVN Server installed on a Windows server, serving several repositories.

Since the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install WebSVN on top of my repositories.

The problem, however, is that I can't seem to get authentication to work. Ideally I'd like my current repository authentication as specified in VisualSVN to work with WebSVN, so that though I see all the repository names in WebSVN, I can't actually browse into them without the right credentials.

By visiting the cached copy of the topmost link on this google query you can see what I've found so far that looks promising.
(the main blog page seems to have been destroyed, domain of the topmost page I'm referring to is the-wizzard.de)

There I found some php functions I could tack onto one of the php files in WebSVN. I followed the modifications there, but all I succeeded in doing was make WebSVN ask me for a username and password and no matter what I input, it won't let me in.

Unfortunately, php and apache is largely black magic to me.

So, has anyone successfully integrated WebSVN with VisualSVN hosted repositories?

A: 

This (and lots of problems like it with WebSVN) is why I asked this.

Keith
+1  A: 

Yes, but since WebSVN runs nicely with my repositories, and I don't really want to install lots of other things like MySQL and such on the same server, I was hoping to get WebSVN running.

Lasse V. Karlsen
+1  A: 

That's the issue I have too.

My problem is that WebSVN is so amazingly slow. It takes about 20 mins to open a head revision (sample repository: few thousand files, 2500 odd revisions). Everything else seems to require MySql and so on.

Keith
A: 

I guess the answer really is to not use WebSVN.

Lasse V. Karlsen
+2  A: 

I'm using VisualSVN Server and I just got done installing Trac. My goal was to get a better web-based repository browser, and Trac is definitely one of the better ones I've seen for Subversion. Go to http://www.visualsvn.com/server/trac/ installation is really quite straightforward. Yes, Trac has a ticket tracking and a wiki system, which you may not be looking for, but the repository and log browser sell it for me.

Now, I have found that it is possible to disable the wiki and ticket tracking systems that come with Trac through simply appending

[components]
trac.ticket.* = disabled
trac.wiki.* = disabled

to the end of the trac.ini configuration file. This causes the start page of the wiki to throw an error that the wiki module cannot be found so you have to set Trac to open with either the Timeline (log view) or Repository Browser on startup by editing the trac.ini again by adding the following under the [trac] heading:

for the log timeline as default

default_handler = TimelineModule

for the repository browser as default

default_handler = BrowserModule
Kit Roed
"Trac plug-in is available only for obsolete versions of VisualSVN Server and currently we do not have plans to update the plug-in on a regular basis" --- Does it work with latest version of VisualSVN?
gbjbaanb
I am using VisualSVN Server v 1.6.3, which as I understand it, is the most recent version of VisualSVN Server. The Trac plugin still works as expected for me at this time. However, I should point out that some of the Trac setup steps need to be repeated when upgrading the VisualSVN Server itself.
Kit Roed
I am disheartened by the fact that VisualSVN has no plans to continue its efforts with the Trac plugin, it proved to be a very useful tool in expanding the accessibility of the repository (the default VisualSVN Server's web-based repo browser is much too limited)
Kit Roed
A: 

Polarion Community Web Client needs "only" java and tomcat, maybe that's an option for you.

André
A: 

I am the author of the article you mentioned. The information I published was only meant for WebSVN running on IIS. It is my understanding that the software should "just work" when you use PHP on Apache, although I have never set it up in that environment. Have you tried doing some "echo"-debugging (for the lack of a better term) to see where exactly the authentication fails?

Jonas Oberschweiber
+5  A: 

I got WebSVN authentication working with VisualSVN server, albeit with a lot of hacking/trial-error customization of my own.

Here's how I did it:

  1. If you haven't already, install PHP manually by downloading the zip file and going through the online php manual install instructions. I installed PHP to C:\PHP

  2. Extract the websvn folder to C:\Program Files\VisualSVN Server\htdocs\

  3. Go through the steps of configuring the websvn directory, i.e. rename configdist.php to config, etc. My repositories were located in C:\SVNRepositories, so to configure the authentication file, I set the config.php line so: $config->useAuthenticationFile('C:/SVNRepositories/authz'); // Global access file

  4. Add the following to C:\Program Files\VisualSVN Server\conf\httpd-custom.conf :

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php


# configure the path to php.ini
PHPIniDir "C:/php"

<IfModule dir_module>
   DirectoryIndex index.html index.php 
</IfModule>

<Location /websvn/>
   Options FollowSymLinks
   AuthType Basic
   AuthName "Subversion Repository"
   Require valid-user
   AuthUserFile "C:/SVNRepositories/htpasswd"
   AuthzSVNAccessFile "C:/SVNRepositories/authz"
   SVNListParentPath on
   SVNParentPath "C:/SVNRepositories/"
</Location>

This worked for me, and websvn will only show those directories that are authorized for a given user. Note that in order for it to work right, you have to provide "Main Level" access to everybody, and then disable access to certain sub-directories for certain users. For example, I have one user who doesn't have main level access, but does have access to a sub-level. Unfortunately, this person can't see anything in websvn, even if he links directly to filedetails.php for a file he's authorized to see. In my case it's not a big deal because I don't want him accessing websvn anyway, but it's something you'll want to know.

Also, this sets the server up for an ssl connection, so once you've set it up, the address will be and https:// address, not the regular http://.

Anthony Johnson
Thanks, I'll test this tonight :)
Lasse V. Karlsen
This is great! Just a couple notes on your instructions. (1) Probably obvious, but you need to restart the VisualSVN Service after performing above steps. (2) The https vs http depends on if you have VisualSVN configured for secure (https) access or not. If you have it configured for standard http, this won't affect that... you will still access SVN and WebSVN over http.Thanks though, this is exactly what I was looking for.
Lloyd Cotten
A: 

Hi Anthony,

Thanks for the detailed description. I am wondering if the same thing is possible with Windows Auth. Can you please provide inputs, if any?

Thanks again. Subbu.

A: 

Hi,

yes, a small howTo for a WindowsAuth would be nice.

best regards

Martin

A: 

Here's how to use it VisualSVN + Trac + WindowsAuth: http://ingenious-excerpts.blogspot.com/2009/02/visualsvn-trac-love.html

A: 

I got this to work with windows authentication (which is actually AuthType VisualSVN) The trick is to comment out the svn auth and replace it with the same sort of auth text found in the main config file. Thanks to Anthony Johnson for working out all the other details.

# For PHP 5 do something like this:
LoadModule php5_module "F:/wamp/bin/php/php5.3.0/php5apache2_2.dll"
AddType application/x-httpd-php .php


# configure the path to php.ini
PHPIniDir "f:/wamp/bin/php/php5.3.0/"

<IfModule dir_module>
   DirectoryIndex index.html index.php 
</IfModule>

#Alias /websvn/ "F:/Program Files/VisualSVN Server/htdocs/websvn-2.3.1/" 

<Location /websvn-2.3.1/>
   Options FollowSymLinks

    AuthName "Subversion Repositories"
    AuthType VisualSVN
    AuthzVisualSVNAccessFile "F:/Repositories/authz-windows"
    AuthnVisualSVNBasic on
    AuthnVisualSVNIntegrated off
    AuthnVisualSVNUPN Off
   Require valid-user


   SVNListParentPath on
   SVNParentPath "f:/Repositories/"
</Location>
MatthewMartin