0
votes

So i have been using SVN over HTTP (Apache and WebDav) for a while now and i want to ditch apache and replace it with svnserve on my Raspberry Pi running the latest ArchLinux.

I started by enabling the svnserve service: systemctl enable svnserve

Then, i added the necessary args to the command in the config file under /etc/config.d/svnserve which now contains the following

SVNSERVE_ARGS="-r /media/USB/repositories --config-file /media/USB/svnserve.conf"
SVNSERVE_USER="svn"

For the record /media/USB is a mount of /dev/sda1 which is an NTFS storage device that is always plugged in.

I have about 70 repositories so it would be tedious to use the conf/ directory inside each one of them to control access and from what i understood, i can do the same thing i was doing with DAV on Apache and have one configuration file to rule them all!

So i put under /media/USB all 3 files below:

svnserve.conf

[general]
anon-access = none
auth-access = write
authz-db = subversion.authz
password-db = subversion.passwd
realm = Subversion

subversion.authz

[/]
* = r
dany = rw

subversion.passwd

dany = some password hash

Now when i checkout a URL using svn://TheCorrectIp/RepoName using TortoiseSVN i get the following error: Error: No access allowed to this repository and i don't even get a prompt to enter a user/pass combination.

Here is what i tried so far with no luck (restarting the service after each trial):

  • Clear TortoiseSVN's password cache
  • Copy all 3 config files under the repository's conf/ directory (just to see if this was a path issue)
  • Use absolute and relative paths in authz-db (relative to the repository's conf, as shown in the documentation, and relative to the svnserve.conf file)
  • Create a fresh new repository and play with its conf directory alone

While fiddling with the svnserve.conf i notice something strange happening:

  • If i comment out authz-db and password-db i still get the same problem
  • If i change anon-access to read or write, and comment out everything else i am able to checkout the repository and i don't get asked for any combination. If i leave the anon-access intact and put back either authz-db or password-db i am unable to checkout again
  • Stopped the service and ran svnserve -d --forground -r /media/USB/repositories --config-file /media/USB/svnserve.conf to monitor console output while doing a checkout: Nothing shows on the console when i do a checkout.

I would really appreciate any feedback to what i might be doing wrong, thanks!

1

1 Answers

0
votes

Well, i finally figured it out, my passwd file was in the wrong format, it has to be like this

[users]
dany = unencrypted password

i will do so more searching to find out if you can actually encrypt the passwords