apache SVN errorcode=2 无法打开请求的 SVN 文件系统

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/991243/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 17:45:44  来源:igfitidea点击:

SVN errorcode=2 Could not open the requested SVN filesystem

svnapachemacos

提问by Gerrit

I've got MAMP running (XAMP for OSX), and I'm trying to setup subversion.

我已经运行了 MAMP(OSX 的 XAMP),我正在尝试设置 subversion。

When I go to the freshly created repository in my browser, I get:

当我在浏览器中访问新创建的存储库时,我得到:

<D:error>
<C:error/>
<m:human-readable errcode="2">
Could not open the requested SVN filesystem
</m:human-readable>
</D:error>

The repository is setup in ~/server/svn. My html/php files are also there (~/server/http), and it works fine. My basic httpd.conf setup:

存储库设置在 ~/server/svn 中。我的 html/php 文件也在那里 (~/server/http),它工作正常。我的基本 httpd.conf 设置:

<Location /svn>
DAV svn
SVNPath ~/server/svntest
(Authenticaton will be added later)
</Location>

I've allready chmod'ed everything to 777

我已经把所有东西都改成了 777

drwxrwxrwx   9 gerrit  staff       306 27 okt  2008 svn

Apache's errorlog does not show any errors.

Apache 的错误日志没有显示任何错误。

How do I troubleshoot this?

我该如何解决这个问题?

采纳答案by Artem Russakovskii

What is ~/server/svntest? The web server doesn't normally have a home dir or even shell access, try substituting it for a full path.

什么是 ~/server/svntest?Web 服务器通常没有主目录甚至 shell 访问权限,请尝试将其替换为完整路径。

回答by Sander Rijken

Try running

尝试跑步

svnadmin verify ~/svntest/svn

on the repository. If that reports errors, run:

在存储库上。如果报告错误,请运行:

svnadmin recover ~/svntest/svn

回答by Govinda

You can try using SVNParentPath instead of SVNPath if you are pointing to a folder having multiple repositories.

如果您指向具有多个存储库的文件夹,您可以尝试使用 SVNParentPath 而不是 SVNPath。

回答by ebe0

Change SELinux security context for repository files:

更改存储库文件的 SELinux 安全上下文:

# chcon --reference=/var/www/html -R /var/svn/repos
# ll -Z /var/svn/repos
drwxr-xr-x  apache apache system_u:object_r:httpd_sys_content_t /var/svn/repos

回答by No0ne

ln -s /home/subversion/repos /var/www/html/

ln -s /home/subversion/repos /var/www/html/

you should NOT do that... access for "everyone"... without svn, svn-user, ...

你不应该这样做......“每个人”的访问......没有svn,svn-user,......

回答by Olof Nordenstam

Had this problem and found it was caused by an incompatible version of SVNadmin and Apache. I had upgraded SVN on the machine (and forgotten that I had). I just used the full path (/usr/local/subversion-1.3.0/bin/svnadmin on my old CentOS machine) to the old svnadmin bin (version 1.3, as opposed to 1.6.11 which I had upgraded to). Then it worked immediately. No file permission issues.

遇到这个问题,发现是SVNadmin和Apache版本不兼容造成的。我已经在机器上升级了 SVN(忘记了我有)。我只是使用了旧的 svnadmin bin(版本 1.3,而不是我升级到的 1.6.11)的完整路径(/usr/local/subversion-1.3.0/bin/svnadmin 在我的旧 CentOS 机器上)。然后它立即起作用。没有文件权限问题。

回答by subbu

The problem is may be due to the port conflicts between virtual host and apache2.Check that once.That resolved the problem for me

问题可能是由于虚拟主机和apache2之间的端口冲突。检查一次。那为我解决了问题

回答by newbie

You should try:

你应该试试:

ln -s /home/subversion/repos /var/www/html/

回答by ahamed

change permissions to chown -R apache:apache /your repo

将权限更改为 chown -R apache:apache /your repo