svn server configuration recipes for Windows
See also: all the recipes and the intro
# SVN for Windows
https://sourceforge.net/projects/win32svn/
# SASL config file options
https://www.cyrussasl.org/docs/cyrus-sasl/2.1.25/options.php
# Suppose it's installed in c:\tools\svn Configuration for SASL
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Carnegie Mellon\Project Cyrus\SASL Library" /v ConfFile /d "c:\work\svn\sasl"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Carnegie Mellon\Project Cyrus\SASL Library" /v SearchPath /d "c:\tools\svn\bin"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Carnegie Mellon\Project Cyrus\SASL Library" /v SearchPath /d "c:\Program Files (x86)\Subversion\bin"
mkdir c:\work\svn\sasl mkdir c:\work\svn\log
# SASL config in c:\work\svn\sasl for a private password database
#---
#auxprop_plugin: NTLM
#ntlm_v2: yes log_level: 3 sasldb_path: c:\work\svn\sasl\sasldb mech_list: DIGEST-MD5 pwcheck_method: auxprop auxprop_plugin: sasldb
#---
# create an user's password in SASL DB
"c:\tools\svn\bin\saslpasswd2.exe" -c -f c:\work\svn\sasl\sasldb -u DOMAIN user
# Create the SVN repository
"c:\tools\svn\bin\svnadmin.exe" create c:\work\svn\repo
# Edit the configuration in c:\work\svn\repo\conf\svnserve.conf
[general]
anon-access = none
auth-access = write
realm = DOMAIN
[sasl]
use-sasl = true
min-encryption = 128
max-encryption = 256
# To start the server manually, in foreground (and it will also give the
# firewall prompt)
"c:\tools\svn\bin\svnserve.exe" -r c:\work\svn\repo -d --log-file c:\work\svn\log\serve.txt
# To set up the server to run as a service (don't forget about the firewall)
sc create svn binpath= "C:\tools\svn\bin\svnserve.exe --service -r c:\work\svn\repo --log-file c:\work\svn\log\serve.txt" displayname="Subversion Server" depend=Tcpip start=auto sc start svn
# Test the access
"c:\tools\svn\bin\svn.exe" ls svn://myhost/
# set the editor
set EDITOR=gvim
set EDITOR=notepad
# Import the data
svn import . svn://myhost/project/trunk
# checkout the data
svn co svn://myhost/project/trunk project