多个svn仓库权限
我在我的服务器上配置了两个存储库站点。第一个位于 /home/svn/repoA
上,第二个位于 /home/svn/repoB
上。
我已经使用以下信息在 Apache 上构建了一个虚拟主机:
<Location />
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Servidor SVN"
AuthUserFile /etc/apache2/dav_svn.passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
现在这是 URL,我可以使用 http://svn.mydomain.com/repoA
和 http:// 访问服务器svn.mydomain.com/repoB
,但我想将 repoB 设为私有,只允许使用之前在 dav_svn.passwd 上使用 htpasswd 创建的用户和密码进行访问。
如果我取出
行,并且它是更接近的标记,它会询问我用户和密码,但在两个存储库中。
有没有一种方法可以使一个存储库仅对匿名用户可读,对登录用户具有读/写权限,而第二个存储库仅对登录用户具有读/写权限?
I have configured two repositories sites on my server. The first is on /home/svn/repoA
and the second on /home/svn/repoB
.
I have built a virtualhost on Apache with this information:
<Location />
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Servidor SVN"
AuthUserFile /etc/apache2/dav_svn.passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Now this the URL, I can get access to the server with http://svn.mydomain.com/repoA
and http://svn.mydomain.com/repoB
, but I want to make the repoB private, only allow access with a user and password previously created with the htpasswd on dav_svn.passwd.
If I take out the <LimitExcept GET PROPFIND OPTIONS REPORT>
line, and it's closer tag, it asks me the user and the password, but in the two repositories.
Is there a way to make one readable only for anonymous and read/write for logged users and the second repository only read/write rights for logged users?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用了哪些资源来实现这一目标?我知道有一本免费的 Subversion 书(使用 Subversion 进行版本控制),里面有答案:
Apache authn/authz: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authz
基于路径的身份验证:http://svnbook。 red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html
What resources have you used to get this far? I know there is a free Subversion book (Version Control with Subversion) that has the answer in it:
Apache authn/authz: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authz
Path-based authz: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html
我只有 2 个位置块。 RepoA 应该在 Apache 位置块中打开“满足任何”以进行匿名只读访问,并且相应的 Auth 文件允许匿名访问。 RepoB 的 Auth 文件应拒绝匿名访问。
即
Apache repoA conf
authFileA
Apache repoB conf
authFileB
I'd just have 2 location blocks. RepoA should have "Satisfy Any" turned on in the Apache location block for anonymous read-only access, and a corresponding Auth file allowing anonymous access. RepoB's Auth file should deny anonymous access.
i.e.
Apache repoA conf
authFileA
Apache repoB conf
authFileB