tortoise svn giving me "Redirect cycle detected for URL 'domain/svn'"
Asked Answered
L

8

15

I want to achieve a svn-root in /var/svn and repositories(projects) in there. I could get it to work in the browser (http://domain/url gives me "Collection of repositories") but the TortoiseClient is giving me the error mentioned in the title.

I set up a subversion on my ubuntu server by doing the following (shortened):

mkdir /var/svn
svnadmin create /var/svn/test

and my dav_svn.conf looks the following:

<Location /svn>
  DAV svn
  SVNParentPath /var/svn
  SVNListParentPath On
</Location>

I read about sym links possibly causing the problem, so I'll attach my 000-default site as well (it's the standard btw):

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

I tried like suggested in How do I list all repositories with the SVNParentPath directive on Apache+SVN? but unfortunately I get another tortoise error then (while I can still see it fine in my browser) It then gives me "The OPTIONS request returned invalid XML in the response: XML parse error at line 1: no element found" (and HTTP OPTIONS to that url indeed gives no response body)

Does anyone know what is causing this problem?

Cheers!

Edit: This is the access.log output after trying to reach http://server/svn through tortoise

(with Location /svn) Notice the 301 .. TortoiseSVN changes the path to 'http://server/svn' without a leading slash, tho I specified to search within 'http://server/svn / '

[10/May/2012:00:42:29 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:29 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:29 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:29 +0200] "PROPFIND /svn HTTP/1.1" 301 516 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:29 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:29 +0200] "PROPFIND /svn HTTP/1.1" 301 516 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "PROPFIND /svn HTTP/1.1" 301 516 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS /svn HTTP/1.1" 301 573 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:42:30 +0200] "OPTIONS / HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"

(with Location /svn/)

[10/May/2012:00:36:57 +0200] "OPTIONS /svn HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:36:57 +0200] "OPTIONS /svn HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:36:57 +0200] "OPTIONS /svn HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:36:57 +0200] "OPTIONS /svn HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:36:58 +0200] "OPTIONS /svn HTTP/1.1" 200 236 "-" "SVN/1.7.4 neon/0.29.6"
[10/May/2012:00:36:58 +0200] "OPTIONS /svn HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:36:58 +0200] "OPTIONS /svn HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
[10/May/2012:00:36:58 +0200] "OPTIONS / HTTP/1.1" 200 236 "-" "SVN/1.7.4/TortoiseSVN-1.7.6.22632 neon/0.29.6"
Loxodrome answered 9/5, 2012 at 21:55 Comment(3)
This may be a longshot, but by any chance do you have your TortoiseSVN going through a web proxy? I've seen requests between the TortoiseSVN repo browser and the repository bounce like this once before, and the web proxy was the source...Bildungsroman
No the tortoise does not use any proxy. Anyways, I made a single repo now and put everything in there - set SVNPath to that one repo and at least I have SVN now.Loxodrome
Maybe is SElinux the problem. Look here at the green solution: serverfault.com/questions/114852/…Aorist
G
7

The TortoiseSVN Repository Browser doesn't seem to support browsing of collection of repositories.

So if you have the repositories:

/var/svn/repo1
/var/svn/repo2
/var/svn/repo3

and the dav_svn.conf

<Location /svn>
  DAV svn
  SVNParentPath /var/svn
  SVNListParentPath on
</Location>

You can browse them with a web browser pointing at http://server/svn.

With TortoiseSVN you must specify also the name of the repository, e.g.

http://server/svn/repo1
http://server/svn/repo2
http://server/svn/repo3
Glyconeogenesis answered 29/7, 2012 at 18:18 Comment(0)
F
12

I konw this is an old thread, however for the beneift of others that find it:

Just a guess, but does the url your browser give you have "viewvc" or some other part that is added in by the svn browser?

i.e. http://mysvn/viewvc/trunk/.....  

Tortoise won't check that out since it's not an actual svn url; your svn url is probably something like

http://mysvnsvr/mysvn/trunk.....
Furry answered 26/3, 2013 at 14:56 Comment(3)
Hey there, no that was not the case. My particular problem was - as Idalonzo said - that Tortoise doesn't support browsing of repos.Loxodrome
Thank you Jay, I'm using SubversionEdge by CollabNet and this solved my problem.Certified
To see the actual repo url, open the [mysvn/viewvc/trunk/] in your browser and at the bottom of the page you will see the svn checkout url.Frighten
B
11

On CentOS7, I removed the Alias directive and it works.

Braggart answered 12/8, 2015 at 16:48 Comment(2)
Just ran into this (many years later) and this was indeed what fixed it for me in the end (CentOS7 server, Win10 client)Louisalouisburg
I also had the same problem on the same distro and the same solution worked :) Do you know why this works?Meagre
G
7

The TortoiseSVN Repository Browser doesn't seem to support browsing of collection of repositories.

So if you have the repositories:

/var/svn/repo1
/var/svn/repo2
/var/svn/repo3

and the dav_svn.conf

<Location /svn>
  DAV svn
  SVNParentPath /var/svn
  SVNListParentPath on
</Location>

You can browse them with a web browser pointing at http://server/svn.

With TortoiseSVN you must specify also the name of the repository, e.g.

http://server/svn/repo1
http://server/svn/repo2
http://server/svn/repo3
Glyconeogenesis answered 29/7, 2012 at 18:18 Comment(0)
D
6

Following @rdconsolo suggestion on Ubuntu 16.04, remove the Alias directive, works for me

#Alias /svn /var/lib/svn
<Location /svn>

DAV svn
SVNParentPath /var/lib/svn
SVNListParentPath On
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user

</Location>
Daunt answered 15/3, 2018 at 22:28 Comment(1)
This work for me too. My environment SVN server on ubuntu 16.04 and client using tortoise on windows 7. I can do 'svn checkout' after remark that line.Unstrap
C
3

I encountered the problem in a standard configuration and the reason was that I used the same directory as DocumentRoot for the webserver and as SVNPath in the websvn/davsvn config.

For details see also What is the cause of "svn: E195019: Redirect cycle detected for URL"?

Cure answered 27/8, 2013 at 20:32 Comment(0)
L
1

The problem for me was that I had a .htaccess RewriteRule in my document root, asking to add a trailing / to every URL not having one.

Because of that, the SVN clients, trying to call URLs WITHOUT a trailing / such as "https://site/repos/project" got reidrected by apache to "https://site/repos/project/", so the SVN client tries to go to "https://site/repos/project" again, and so on.

SOLUTION: Do not have any rule that add a trailing / that could affect your SVN urls.

Larissa answered 5/3, 2015 at 14:44 Comment(0)
F
0

Adding the:

SVNListParentPath on

line alone solved this issue for me.

Finnell answered 7/12, 2017 at 1:52 Comment(0)
S
-1

I had the same problem but not for multiple repositories just tags,branches,etc within a repository. Removing the Alias tag in the conf file fixed this. I am running Centos 7 with SVN 1.8 and Tortoise 1.9.

Sporty answered 4/11, 2016 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.