Getting a SVN Server running properly on WinXP/2000/Vista can be a confusing process, here's how I do it:
Other things to check if it's not working
- Install TortioseSVN from http://tortoisesvn.net/downloads
- Right click on an empty folder and choose TortoiseSVN -> Create repository Here
- Install Apache Windows Server from http://httpd.apache.org/download.cgi
- Get 'Subversion Win32 binaries for Apache' from http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100 and put in C:\svn
- Copy C:\svn\bin\mod_authz.svn.so and C:\svn\bin\mod_dav_svn.so to C:\Program Files\Apache Software Foundation\Apache2.2\modules
- Edit C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf
Add/uncomment the following lines to the LoadModule section:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
- Add the following to the end of the file:
SVNPath (path to the svn repository you made)
AuthName "Subversion repository"
#allow only authenticated users to access
# allow read access to all, write access to authenticated users only
# Require valid-user
- Next you need to create some users that can access your SVN repository through Apache
Open command prompt at C:\Program Files\Apache Software Foundation\Apache2.2
bin\htpasswd.exe -c passwd (username you want to add)
Note: it will prompt to set the user's password
- run the Apache Server
- On the router, make sure to enable port forwarding for TCP port 80 (www) and 3690 (svn)
- Test the Apache Server to make sure it's working:
http://localhost -> does the web server work?
http://localhost/svn -> does mod_dav, svn modules & authentication work on the server?
http://188.8.131.52 -> (this is your external ip) does remote access work for the server?
- Next you need to set up authentication for the actual SVN service (this is different than the Apache authentication in step 8).
Go to the directory you created your repository in (step 2) and go into the conf subdirectory.
edit the passwd file with a text editor and add a user and password in there (there should be commented out examples):
testusername = testpassword
- Open svnserve.conf in that same directory with a text editor.
make sure you have something like the following in there that's uncommented:
anon-access = none # this disallows anonymous people from accessing the repository, you can set this to read also
auth-access = write # read/write access for authenticated users
password-db = passwd # make sure this is uncommented, it's commented by default
- Next we need to install the SVN service
Open command prompt at C:\svn\bin
sc create svn.local binpath= "\"c:\svn-win32-1.5.2\bin\svnserve.exe\" --service --root F:\work\Andrograde\svn" displayname= "Subversion Repository" depend= Tcpip
Next go to Services and turn the service on
go to Subversion Repository -> click start (optionally set it to Automatic)
- Test the repo-browser:
right click on a folder -> tortoiseSVN -> Repo-browser
svn://localhost -> test if it works internally
svn://184.108.40.206 -> (this is your external ip) test if it works remotely
- Make sure the svn versions are the same throughout Apache, SVN and TortoiseSVN. If they're not the same version, you will get something like:
(20014)Error string not specified yet: Expected version '3' of repository; found version '5'
You get in TortoiseSVN
No access allowed to this repository
Make sure you have step 12 and 13 correct.