A friend and a colleague asked me to help him on setting up SVN with apache authentication, after a little bit of googling I find a nice-easy-to-use-howto at archlinux website., which covers the SVN + Apache Basic Authentication, but here I'll talk about the Digest Authentication since it is more secure than apache basic authentication.
NOTE: I'm using Archlinux
1- Install apache webserver and subversion server "SVN" on your distro:
pacman -S apache subversion
2- Load the needed modules for apache:
vim /etc/httpd/conf/httpd.conf and add this 2 lines
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
also make sure that you have auth_digest and dav_module modules are loaded
3- Make the SVN repositories directory:
mkdir -p /home/svn/repositories
4- Force apache to redirect any request to SSL:
vim /etc/apache/conf/httpd.conf and add this lines
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
5- Create your SSL certification files and include them into httpd.conf in archlinux case do what is written /etc/httpd/conf/mod_ssl.txt
6- Create subversion configurations file:
vim /etc/httpd/conf/extra/httpd-svn.conf and add the following lines
<Location /svn>
DAV svn
SVNParentPath /home/svn/repositories
AuthzSVNAccessFile /home/svn/.svn-policy-file
AuthName "SVN"
AuthType Digest
AuthDigestProvider file
AuthUserFile /home/svn/.svn-digest-file
Satisfy Any
Require valid-user
</Location>
7- Create apache digest access file:
this file will contain the username , realm and password for the apache users
htdigest -c /home/svn/.svn-digest-file SVN username
to add more users remove "-c" option from the command line.
NOTE: the realm in that case is SVN
8- Include the new configurations into apache configurations:
vim /etc/httpd/conf/httpd.conf and include the new file " in case of archlinux uncomment the SSL file too
Include /etc/httpd/conf/extra/httpd-ssl.conf
Include /tc/httpd/conf/extra/httpd-svn.conf
9- Create the policy file:
vim /home/svn/.svn-policy-file and add this lines
[/]
* = r
[test:/]
username = rw
in that file we set the policy for each project to r " read " or w " write " or rw for the users. the * means anyone can read the SVN repository but not commit. if you want to disable anonymous access just remove the 1st 2 lines.
10- Create the repository:
svnadmin create /home/svn/repositories/test
11- Change owner of the repositories to the apache user:
chown -R nobody.nobody /home/svn/repositories/test
NOTE: in archlinux the user that running apache is nobody, in debian based distro it is www-data make sure to chown the directories to the actual user that running apache.
12- Create your development tree:
mkdir branches tags trunk
13- Import your application:
go to your application path and start importing
svn import -m "1st revision" https://localhost/svn/test
and you are done, I hope it was useful
It has been some time since
It has been some time since I moved and living in Cairo , the big, noise, and depressing capital 642-533 of Egypt , I do not hate Cairo but also I can not say I am a fan even with all this places for entertainment, the Nile, cinemas, really nice big 642-825 malls, pyramids, and so on, but on the other hand there is the dark side, 642-873 the ugly side, all drivers always on harry everyone is honking like they never honk bef
Re
this topic is very smashing stuff and I think that someone can buy an essay or essay writing to know more information referring to it from writing service.
Info
Nice
Like it!
Great!
Contrary to the other posters down here, I actually find this article quite interesting. The only issue with digest authentication is: I am not sure how well it is supported by TortoiseSVN and suchs. So: great job!
Digest and SSL
Using digest auth is redundant when you're already running SSL, and having to store passwords in clear outweighs any benefits it may have.
True
You are right, but I was learning to use digest with SVN, so no harm. all is good in the end there is already Basic authentication with SVN howto :-)
My WebSite
This is my Website I am FREE to do write whatever I WANT, I am FREE to use whatever Distro. I WANT, and please feel free NOT to stop by.
Useless
nobody uses archlinux, useless post.
oh god
That was a complete waste of time, just please don't write anymore
girls
this isn't a useful way to attract girls.
rspencer
Well that was completely useless.