Http access to SVN, anyone?

Gijs info at boer-software-en-webservices.nl
Sat Dec 22 16:51:18 UTC 2007


Timothy Murphy wrote:
> Arthur Pemberton wrote:
>
>>> I have access to my SVN repository from a remote client
>>> using svnserve, but not through http .
>>>
>>> I guess the problem probably lies in httpd.conf ,
>>> but I haven't come across a document that says
>>> exactly what changes one has to make for svn .
>>> (I do have mod_dav_svn installed.)
>>>
>>> Any enlightenment or pointers gratefully received.
>
>> http://svnbook.red-bean.com/
>
> This is a bit like saying the answer is in the Bible.
>
> I actually have the online book on my computer,
> and have followed the rather meagre instructions on this point,
> but get the errors above.
>
> I can checkout a project with svnserve:
> =========================================
> [tim at elizabeth tmp]$ svn checkout
> svn://www.gayleard.com/var/www/svn/Maths/Penrose Penrose
> A    Penrose/trunk
> A    Penrose/trunk/penrose.ins
> A    Penrose/trunk/penrose.dtx
> A    Penrose/trunk/README
> A    Penrose/brances
> A    Penrose/tags
> Checked out revision 1.
> =========================================
> But I cannot checkout with http:
> =========================================
> [tim at elizabeth tmp]$ rm -rf Penrose
> [tim at elizabeth tmp]$ svn checkout
> http://www.gayleard.com/var/www/svn/Maths/Penrose Penrose
> svn: PROPFIND request failed on '/var/www/svn/Maths/Penrose'
> svn: PROPFIND of '/var/www/svn/Maths/Penrose': 405 Method Not Allowed
> (http://www.gayleard.com)
> =========================================
> It isn't even allowed on the same computer:
> =========================================
> [tim at alfred tmp]$ svn checkout http://localhost/var/www/svn/Maths/Penrose
> Penrose
> svn: PROPFIND request failed on '/var/www/svn/Maths/Penrose'
> svn: PROPFIND of '/var/www/svn/Maths/Penrose': 405 Method Not Allowed
> (http://localhost)
> =========================================
>
>
Well, that is because you are accessing the SVN repository with the
wrong url.
Because you are requesting your HTTP server for the data, and not the
svn server, the url is also different.
And you will have to create some kind of subversion config for Apache.
Mine is like this:
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<Location /svn>
  DAV svn
  SVNPath /data/www/svn

  AuthzSVNAccessFile /data/www/svn/conf/authz
  Require valid-user

  # Limit write permission to list of valid users.
  <LimitExcept GET PROPFIND OPTIONS REPORT>
    # Require SSL connection for password protection.
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /etc/svn-auth-file

    SSLRequireSSL
  </LimitExcept>
</Location>

This allows me to access my repository through http://myservername/svn/
which is located at /data/www/svn
so I can do for example:
svn co http://myservername/svn/
As you see in the config file, you also have to create some kind of
authentication mechanism, to allow the mod_dav_svn module to
authenticate your user.

Hope this helps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071222/fc92d2ee/attachment-0001.htm>


More information about the fedora-list mailing list