set password for websvn in ubuntu server?

2.2k Views Asked by At

i have installed websvn using apt-get install websvn in ubuntu server.

i can now access websvn through http://url/websvn.

however, i want to set a password to the access, so only authorized people could access it.

how could i do this?

3

There are 3 best solutions below

2
On BEST ANSWER

Have a look at the documentation at Subversion repository browsing with authorization

Hope this helps.

0
On

You can just put in a .htaccess file in the root of the websvn folder:

http://www.duchnik.com/tutorials/vc/setting-up-and-configuring-websvn

0
On

Add User admin for repository authentication.

$ sudo htpasswd -c /etc/global.htpasswd admin

Open the dav_svn.conf file.

$ sudo nano /etc/apache2/mods-enabled/dav_svn.conf

Add the below line.

<Location /svn>
DAV svn
SVNParentPath /var/lib/svn
</Location>
<Location /svn/RepoName>
 AuthType Basic
 AuthName \"RepoName Subversion Repository\"
 AuthUserFile /etc/global.htpasswd
 Require user admin 
</Location>

Please set the above correct SVNParentPath. Make sure apache2-utils is installed.

$ sudo apt-get install -y apache2-utils
$ sudo service apache2 restart