Friday, March 02, 2001 ..:: Home ::.. Register  Login
   TechTidBits (Blog)  

Setting up Anonymous access to your SVN server?

Feb 20

Written by:
Friday, February 20, 2009 11:40 PM  RssIcon

Are you trying to share your code with the outside world?  Are you using SVN (or a variant like VisualSVN Server)?  If you answered yes to both of these, then read on for some assistance.

Tonight I wrote a blog and wanted to share my code.  I had two options.

  1. Zip up the solution/project/code/html/etc and copy/move it over to a directory on my web server which has external access.
  2. Let SVN do all the work for me and whip up the code in VS08, add the project to SVN, commit the code and BOOM, DONE!  Awesome!

I used to do it like #1, but tonight I'm trying it out like #2.  Can you tell I MUCH prefer that way? :>>>>  This let's me focus back on coding instead of managing files, especially if I make a small booboo (those bugs are features right? :>>>>) and have to update the code, the blog entry automagically references the right code base.  BEAUTIFUL!  But in order to do that, I had to convince SVN (VisualSVN Server in my case) to allow anonymous access to my code.  The trick here was found after reading Rick Strahl's blog (thank you Rick! :>).  

To do this, there are four steps you have to perform.  Don't worry, there's no rocket science here, nothing that'll take you an hour to do, just four small, simple steps you need to do to convince your code to grow legs and start walking! :>

The first trick is to edit the the Apache server's httpd-custom.conf file (http daemon configuration file) and add the Satisfys All in the Location node.  The caveat here is, you could update the httpd.config file, but whenever you upgrade or change the SVN ports, this setting gets whipped out and you have to redo it.  So save yourself the future headache of having your friend's emailing you saying your source code server's down.

Apache httpd.conf changes for anonymous access

Second, you'll have to setup your repository security so that "Everyone" has access, most likely with "Read Only" permissions.

SVN Repository Security Setup For Everyone

Thirdly, you'll have to restart the SVN server. You changed the config file, so you'll have get Apache to reload it again. Nope, sorry, it's not like IIS and dynamically reloads like web.config after changes. Visual SVNServer gives you a nice admin tool with a restart button for convenience.

Fourth and lastly, you'll have to open up the SVN Server's port in your router. Sorry, I can't help you out much there (and if you pooch things here, you'll probably be off the internet, so be careful what you change here, on the other hand, you won't be able to get back on to complain to me, DOH! :>). The best I can do is suggest you look for something that says Port Forwarding with links to a Port Range, Protocol IP Address and if you're lucky an option to enable/disable them.

At this point, you'll be able to point people to your code, either with their browser, or with the SVN client. If you wanted to look at my code, the SVN url is:

This can be used either in your favourite browser, or by command line like

svn checkout

Grab a coffee and get coding! :>


Resources: Rick Strahl: Running VisualSVN Server for Subversion Source Control

Location: Blogs Parent Separator TechTidBits

4 comment(s) so far...

Re: Setting up Anonymous access to your SVN server?

Finally my friend!... you've moved to the SVN way of sharing code on the Internet :) ... I LOVE just being easily able to throw in the URL to a repository and boom, instantly have the code (updates, etc). I have a couple of googleplex projects that I monitor this way (moviejukebox being one of them) :)

By Shane on   Saturday, February 21, 2009 2:15 PM

Re: Setting up Anonymous access to your SVN server?

re love being able to throw in the URL
Very cool! From readers standpoint, that's exactly what I wanted to read! From my standpoint, being able to just create the code in VS and commit it to SVN is very attracive too! From everyone's standpoint, saves everyone time! :>

re MovieJukeBox
I have to check that one out later on.

PS If you register and I accept you as a reader, your comments are no longer moderated! :> Yup, if you register, you'll be able to see your comments right away! :> Have a good one! Back to dev specs!

By phenry on   Saturday, February 21, 2009 2:22 PM

Re: Setting up Anonymous access to your SVN server?

I added in these svn:ignore properties to remove any unnecessary files generated by VS (debug/release executable, etc).


The bin entry effectively removes any/all debug and release files. the .user and .suo keep out personal VS settings. And the desktop.ini and thumbs.db remove Windows special files which are already very user dependant.

Do you have any others I'm missing?


By phenry on   Tuesday, February 24, 2009 12:05 PM

Re: Setting up Anonymous access to your SVN server?

Scott Hanselman's got a blog about this too!

By phenry on   Thursday, June 04, 2009 12:13 PM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Add Comment   Cancel 
Copyright 1999-2012 by   Terms Of Use  Privacy Statement