windows 如何为我们的 Subversion 设置解决“405 Method Not Allowed”问题?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/776771/
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
How do I solve "405 Method Not Allowed" for our Subversion setup?
提问by Marcus Stade
We're serving our source code using VisualSVN Server running on Windows Server 2003. Recently, we split a portion of a project into a new project in its own repository, and then linked it back to the original project using svn:externals
. Since then, we've been having issues when we try to commit files with Subclipse.
我们使用在 Windows Server 2003 上运行的 VisualSVN Server 提供我们的源代码。最近,我们将项目的一部分拆分到其自己的存储库中的一个新项目中,然后使用 将其链接回原始项目svn:externals
。从那时起,当我们尝试使用 Subclipse 提交文件时,我们一直遇到问题。
The error we're getting is:
我们得到的错误是:
svn: Commit failed (details follow):
svn: PROPFIND of '/svn': 405 Method Not Allowed (https://svn.ourserver.com)
svn:提交失败(详情如下):
svn: PROPFIND of '/svn': 405 Method Not Allowed ( https://svn.ourserver.com)
Googling for a while didn't really help, and our configuration seems to be correct. It should also be noted that we've been running this server for a while now without these problems and apart from splitting the project into two repositories, no changes have been made to the server (i.e., configuration files are the same).
谷歌搜索了一段时间并没有真正帮助,我们的配置似乎是正确的。还应该注意的是,我们已经运行该服务器一段时间了,没有出现这些问题,除了将项目拆分为两个存储库之外,没有对服务器进行任何更改(即,配置文件是相同的)。
It should also be noted that these errors only appear when we try to check in multiple files at once. If we check in one file at a time there are no errors. Also, it only appears in Subclipse as far as we know right now, and Versions.app
(OS X) seems to work fine, so that is our current workaround.
还应该注意的是,这些错误仅在我们尝试一次检入多个文件时才会出现。如果我们一次签入一个文件,则没有错误。此外,据我们目前所知,它只出现在 Subclipse 中,而且Versions.app
(OS X) 似乎工作正常,所以这是我们目前的解决方法。
How do I analyze the error to find the cause and subsequently fix it?
如何分析错误以找到原因并随后修复它?
I'm by no means an SVN guru and right now I'm clueless.
我绝不是 SVN 大师,现在我一无所知。
It seems we can check in multiple files in the same package, but not files from multiple packages. Also, when I "split" the project into two repositories, I imported the original repository with a new name. I did not do a dump and then import that dump. Could that be the source of our issues, and if so, how would I solve that?
似乎我们可以检入同一个包中的多个文件,但不能检入多个包中的文件。此外,当我将项目“拆分”为两个存储库时,我使用新名称导入了原始存储库。我没有做转储然后导入该转储。这可能是我们问题的根源,如果是,我将如何解决?
After some jerking around it seems as though it is indeed related to when checking in files in different repositories. If I try to do a single commit in both repository A and repository B (referenced by svn:externals
) at the same time, I get the error. Versions.app
handles this correctly, but I guess it might just be doing two commits, not a single one. Subclipse fails miserably. For now, we simply do multiple commits, one for repository A and one for repository B, that works just fine. If anyone smarter than me could fill in the details why this is happening, whether or not this kind of setup is stupid, etc., please go right ahead.
经过一番折腾之后,似乎确实与签入不同存储库中的文件有关。如果我尝试同时在存储库 A 和存储库 B(由 引用svn:externals
)中进行一次提交,则会收到错误消息。Versions.app
正确处理这个问题,但我想它可能只是做两次提交,而不是一次。Subclipse 惨败。现在,我们只需进行多次提交,一个提交给存储库 A,一个提交给存储库 B,这工作得很好。如果有比我更聪明的人可以详细说明为什么会发生这种情况,这种设置是否愚蠢等,请继续。
采纳答案by Lazy Badger
Prerequisite: Hire a good administrator
先决条件:聘请一位优秀的管理员
Problem: VisualSVN Server uses path-based authentication for all and any parts of repos inside it. Default access-level (AFAICR) - is * = r
for root and this setting inherited into all nodes below (repository's root also) and when you try to commit into a new repository without good ACLsfor it (or misconfigured) you get a problem
问题:VisualSVN 服务器对其内部存储库的所有和任何部分使用基于路径的身份验证。默认访问级别 (AFAICR) -* = r
用于 root 并且此设置继承到下面的所有节点(存储库的 root 也是),并且当您尝试提交到没有良好 ACL(或配置错误)的新存储库时,您会遇到问题
Solution: Check Property of the new repository in the VisualSVN Server MMC-applet, and check permissions and users. In the simplest case, the user, who have write-rights (can commit) in a super-repository (repository with externals) have to have (if it is allowed by policy) write-rights in the sub-repository (repository with linked resources).
解决方案:在VisualSVN Server MMC-applet中检查新仓库的属性,并检查权限和用户。在最简单的情况下,在超级存储库(具有外部的存储库)中具有写权限(可以提交)的用户必须(如果策略允许)在子存储库(具有链接的存储库)中具有写权限资源)。