I need to maintain a mirrored repository for users(read-only). I need to block all commits except the commit from svnsync. I think I can use a pre-commit hook to block commits other than the svnsync?

How can I do this?

有帮助吗?

解决方案

Why use a hook? Can't you just use the authz file to set appropriate permissions?

E.g.

[/]
svnsync = rw
* = r

其他提示

I would avoid the mirror - and concentrate on getting your access control straight in the master so the users can be constrained to read only access.

You'll set that up in much the same way as the scenario you described. only allowing the service account that does the svnsync to commit. There are lots of options here, depending on your setup. Are you integrating with LDAP? How are you currently doing authentication/authorization?

check out svnperms

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top