How do I access my SVN repository through the internet?
July 23, 2007 6:38 AM   Subscribe

How do I access my SVN repository through the internet?

I set up subversion on a windows machine and am running it as a service. I set up C:\SVNRepo os my repository. Now, I would like to have access to the reposiry through the internet. I have no problem accessing it over the local network.

I was under the impression that I should be able to type svn://www.example.com/SVNRepo and have the TortoiseSVN browser come up and that would be it, but that does not seem to work. Am I doing something wrong?

Help will be appreciated.
posted by kaozity to Computers & Internet (9 answers total) 1 user marked this as a favorite
 
First things first: Do you have that machine available over the internet *period*? As in, www.example.com redirects to that computer? You'll need your router to do port-forwarding over whatever port(s) SVN is using, assuming you have a standard home-network setup.
posted by Tomorrowful at 6:49 AM on July 23, 2007


It's also worth asking; how do you access it locally? Do you use svn://localhost/SVNRepo from your home machine, or file:///SVNRepo?

There are a few ways of configuring svn to provide networked access to its resources, but if you've done nothing to set it up other than create a repository then none of those will be enabled.

I would refer you to the SVN book: http://svnbook.red-bean.com/

In particular, the chapter on server configuration in the hopes that it'll get you on the right track.
posted by ChrisR at 6:57 AM on July 23, 2007


The machine is available over the internet. Apache is running on it and "www.example.com" redirects to it.

After reading the chapter on server conviguration, it made it seem that after I set up the SVN service, i would be able to access it via web-browser... but it gives an error saying that the host failed to respond.

when accessing it internally over the network.. i type into the browser svn://192.168.1.6 and it pops up fine.
posted by kaozity at 7:33 AM on July 23, 2007


I'm assuming that you or someone has told the router to redirect port 80 (http) requests to 192.168.1.6:80. You need to do that for each service that you need to be visible through the Internet. I don't know what port svn uses but you need to find that out and then set the router to redirect requests on the port to the host running SVN.
posted by octothorpe at 7:47 AM on July 23, 2007


Where would I find the configuration file to change and/or see the port that SVN is running on.
posted by kaozity at 8:07 AM on July 23, 2007


The standard port number for svnserve is 3690. Chances are that is configured in the definition of the windows service that is running that process for you.
posted by mmascolino at 8:13 AM on July 23, 2007


If you want to access your repository through Apache, you need to apply the appropriate configuration to httpd.conf. This is a different method than svnserve. chrisr pointed you to the right place up above. In particular you should check this section, which describes configuring Apache. Here's a snippet of my httpd.conf:
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so
<Location /repos>
  DAV svn
  SVNPath /usr/local/subversion/repos
  AuthType Basic                
  AuthName "Subversion repository"
  AuthUserFile /etc/svn-auth-file
  Require valid-user
</Location>
I've found the people on the Subversion IRC channel to be very helpful as well -- try #svn on irc.freenode.net if the above doesn't get you there.
posted by harmfulray at 10:33 AM on July 23, 2007


From experience, everything you're asking is in the red bean book. Use ChrisR's link and read up.
posted by boo_radley at 12:18 PM on July 23, 2007


Yeah, the only thing that I couldn't get right out of the red bean book was securing the server through SSL; there's some instruction there, but I ended up needing a lot of advice on the way through.

The book will get you the rest of the way, though.
posted by ChrisR at 7:33 PM on July 23, 2007


« Older Good seats for "The Lion King"?   |   Who is Goljan Newer »
This thread is closed to new comments.