TortoiseSVN 存储库浏览器错误:“存储库已永久移动到 . 。 ”。”
我遇到了与下面的人报告的完全相同的问题,但遗憾的是那里的解决方案对我不起作用。我有多个 subversion 存储库,全部位于一个公共父目录下。我已经安装了 CollabNet Subversion Edge 2.0.0(适用于 Solaris 10 / SPARC),并保留了大多数默认开箱即用的设置。然后我加载了存储库(它们是从隔离网络上的服务器转储的)。用户可以通过 TortoiseSVN 查看各个存储库,但是当他们尝试使用 TortoiseSVN 存储库浏览器时,会出现臭名昭著的“存储库永久移动”错误。我检查过,Apache DocRoot 和 Subversion 存储库目录不重叠,这似乎是此问题的常见原因。存储库位于 /opt/csvn/data 下,Apache 文档根目录为 /opt/csvn/www。以下是我认为相关的配置文件。它的表现就像 SVNParentPath 不起作用。我可以通过 Firefox 查看存储库(经过身份验证后),我认为这意味着 Apache 正在为该目录提供服务而不是 DAV?如果我远程登录到端口 80 并“GET /svn”,它将返回 302 错误。如果我远程登录到端口 80 并“GET /svn/”,我会得到 401(需要授权)。我在 svn_viewvc_httpd.conf 中尝试了“Location /svn/”和“Location /svn”,但这没有帮助。
这里有非常相似的问题:
仅限存储库浏览器 - “存储库已永久移动到...请重新定位”< /a>
svn_viewvc_httpd.conf 文件:
subversion # cat svn_viewvc_httpd.conf
#
#
# DO NOT EDIT THIS FILE IT WILL BE REGENERATED AUTOMATICALLY BY SUBVERSION EDGE
#
# If you must make a change to the contents of this file then copy and paste the
# content into the httpd.conf file and comment out the Include statement for
# this file. The httpd.conf file is not modified or generated and is safe for
# you to modify.
#
#
Include "/opt/csvn/data/conf/ctf_httpd.conf"
# SSL is off
LoadModule python_module lib/modules/mod_python.so.2.4
# Work around authz and SVNListParentPath issue
RedirectMatch ^(/svn)$ $1/
<Location /svn/>
DAV svn
SVNParentPath "/opt/csvn/data/repositories"
SVNReposName "CollabNet Subversion Repository"
AuthzSVNAccessFile "/opt/csvn/data/conf/svn_access_file"
SVNListParentPath On
Allow from all
AuthType Basic
AuthName "CollabNet Subversion Repository"
AuthBasicProvider csvn-file-users
Require valid-user
</Location>
<Directory "/opt/csvn/www/viewvc/docroot">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Alias /viewvc-static "/opt/csvn/www/viewvc/docroot"
ScriptAlias /viewvc "/opt/csvn/bin/mod_python/viewvc.py"
<Location /viewvc>
SetHandler mod_python
PythonDebug on
AddDefaultCharset UTF-8
SetEnv CSVN_HOME "/opt/csvn"
PythonPath "[r'/opt/csvn/lib', r'/opt/csvn/bin/mod_python', r'/opt/csvn/lib/viewvc']+sys.path"
PythonHandler handler
Allow from all
AuthType Basic
AuthName "CollabNet Subversion Repository"
AuthBasicProvider csvn-file-users
Require valid-user
</Location>
提前感谢我今天花了几个小时,也许我只是错过了显而易见的事情。
I am having the exact same problem the below person reported but sadly the solution there is not working for me. I have multiple subversion repositories all under a common parent directory. I've installed CollabNet Subversion Edge 2.0.0 (for Solaris 10 / SPARC ) and left most defaulted out-of-the-box. I then svnadmin load'ed the repositories (they were dumped from a server on an isolated network). The users can check out individual repositories via TortoiseSVN O.K. but when they try to use the TortoiseSVN repository browser, it gives the infamous "repository moved permanently" error. I have checked and the Apache DocRoot and Subversion repository directories do not overlap, which seems to be the common cause of this problem. The repositories are under /opt/csvn/data and the Apache docroot is /opt/csvn/www. Below is the I believe relevant configuration file. It is acting like SVNParentPath isn't working. I can view the repositories via Firefox (after it authenticates) which I assume means Apache is serving that directory instead of DAV? If I telnet to port 80 and "GET /svn" it returns the 302 error. If I telnet to port 80 and "GET /svn/" I get a 401 (Authorization Required). I've tried both "Location /svn/" and "Location /svn" in svn_viewvc_httpd.conf but that didn't help.
Very similar problem here:
Repository Browser Only - "Repository moved permanently to… please relocate”
svn_viewvc_httpd.conf file:
subversion # cat svn_viewvc_httpd.conf
#
#
# DO NOT EDIT THIS FILE IT WILL BE REGENERATED AUTOMATICALLY BY SUBVERSION EDGE
#
# If you must make a change to the contents of this file then copy and paste the
# content into the httpd.conf file and comment out the Include statement for
# this file. The httpd.conf file is not modified or generated and is safe for
# you to modify.
#
#
Include "/opt/csvn/data/conf/ctf_httpd.conf"
# SSL is off
LoadModule python_module lib/modules/mod_python.so.2.4
# Work around authz and SVNListParentPath issue
RedirectMatch ^(/svn)$ $1/
<Location /svn/>
DAV svn
SVNParentPath "/opt/csvn/data/repositories"
SVNReposName "CollabNet Subversion Repository"
AuthzSVNAccessFile "/opt/csvn/data/conf/svn_access_file"
SVNListParentPath On
Allow from all
AuthType Basic
AuthName "CollabNet Subversion Repository"
AuthBasicProvider csvn-file-users
Require valid-user
</Location>
<Directory "/opt/csvn/www/viewvc/docroot">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Alias /viewvc-static "/opt/csvn/www/viewvc/docroot"
ScriptAlias /viewvc "/opt/csvn/bin/mod_python/viewvc.py"
<Location /viewvc>
SetHandler mod_python
PythonDebug on
AddDefaultCharset UTF-8
SetEnv CSVN_HOME "/opt/csvn"
PythonPath "[r'/opt/csvn/lib', r'/opt/csvn/bin/mod_python', r'/opt/csvn/lib/viewvc']+sys.path"
PythonHandler handler
Allow from all
AuthType Basic
AuthName "CollabNet Subversion Repository"
AuthBasicProvider csvn-file-users
Require valid-user
</Location>
Thanks in advance. I've spent several hours on this today and maybe I'm just missing the obvious.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,删除
RedirectMatch ^(/svn)$ $1/
行。然后:您无法浏览位置
/svn
或/svn/
因为在您的设置中,该位置是一个简单的 http 页面,不是真正的存储库。您只能在普通网络浏览器中浏览该 URL,而不能使用 TSVN 存储库浏览器。另请查看此常见问题解答条目。
First, remove the
RedirectMatch ^(/svn)$ $1/
line.Then: you can not browse the location
/svn
or/svn/
since in your setup, that location is a simple http page, not a real repository. You can only browse that url in your normal webbrowser, but not with the TSVN repository browser.Also have a look at this FAQ entry.