What is the cause of “svn: E195019: Redirect cycle detected for URL”?

后端 未结 5 2766
梦毁少年i
梦毁少年i 2020-12-30 06:38

Trying to checkout from my SVN repo gives me

    svn: E195019: Redirect cycle detected for URL ...

However, it appears as if this error only occurs whe

相关标签:
5条回答
  • 2020-12-30 06:49

    (I given an answer to my own question, after using half a weekend to search for the solution):

    It appears as if this error message is related to the fact that the subversion repository is located in a directory svn/myrepo where the directory svn is also listed as the DocumentRoot of the subdomain svn.mydomain.com. That DocumentRoot directive was not obvious to me, since the document root of the subdomain was configered in a different conf file (I am using Plesk to maintain the server). This created some kind of ambiguity. Once I moved the document root of the subdomain to a different location, the error message went away.

    The problem was hard to track down, because - as far as I know -

    • The error does not appear if the repo is located at the top level of the subdomain, i.e. <Location /> and SVNPath /var/www/vhosts/mydomain.com/svn in the above configuration.

    • The error only shows up if the repo is accessed via a proxy.

    • The clash with DocumentRoot was not so obvious, because it was a subdomain.

    So to summarize: the solution (when using Plesk): Change the "DocumentRoot" of the subdomain in the Plesk setup (GUI) to something different form the SVN directory. The "DocumentRoot" of www.mydomain.com is httpdocs. The "DocumentRoot" of svn.mydomain.com was (by default) svn. I changed that to httpdocs-svn and the problem was gone. The folder httpdocs-svn isn't used in my setup since everything below svn.mydomain.com is handled by DavSVN.

    0 讨论(0)
  • 2020-12-30 06:49

    In my case the problem is there was a non compatible settings between to configuration files on ubuntu.

    I have ubuntu 18.04 and Apache2 and the lastest svnserver from ubuntu and to solve the problem of redirecting i had to remove Alias from two different configuration files: /etc/apache2/mods-enabled/dav_svn and /etc/apache2/site-enabled/default-ssl.conf

    /etc/apache2/mods-enabled/dav_svn

     #Alias /svn /svn_repo/svn
     <Location /myrepo>
        DAV svn
        SVNPath /svn_repo/svn
        AuthType Basic
        AuthName "Subversion Repository"
        AuthUserFile /mypath/dav_svn.passwd
        Require valid-user
        AuthzSVNAccessFile /etc/apache2/dav_svn.authz
    </Location>
    

    /etc/apache2/site-enabled/default-ssl.conf

     #Alias /svn /svn_repo/svn
     <Location /myrepo>
        DAV svn
        SVNPath /svn_repo/svn
        AuthType Basic
        AuthName "Subversion Repository"
        AuthUserFile /mypath/dav_svn.passwd
        Require valid-user
        AuthzSVNAccessFile /etc/apache2/dav_svn.authz
    </Location>
    

    obviusly after modification i need to restart apache:

    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-12-30 07:13

    I was facing similar kind of error following this tutorial: How to Install SVN Server on Ubuntu 18.04 & 16.04 LTS. Later realized, I have to delete the following line in Step 5

    Alias /svn /var/lib/svn

    0 讨论(0)
  • 2020-12-30 07:14

    The problem is with the SVN URL which you gave during check-out. I checked various post for this problem but none of them worked for me. Below is the very simple solution that worked for me,

    You need to you csvn repository using link 'http://localhost:3343/csvn/repo/list ' and copy the URL of 'Checkout command' for the repository which you want to access.

    This URL you need to use in the tortoise SVN client for checkout.

    0 讨论(0)
  • 2020-12-30 07:15

    Make sure the link you are using is the 'svn' and not the 'view' link.

    i.e. www.myrepo.com/svn/myproject/trunk ||correct
    www.myrepo.com/view/myproject/trunk ||incorrect

    That should work.

    0 讨论(0)
提交回复
热议问题