问题
How can I limit access to a repository so certain users can only checkout/update?
We want to control the repository so only production-ready code is committed to the repository, but still want the programmers to use the repository, and have the up-to-date code available.
回答1:
Assuming you're using svnserv:
You need to configure the user's rights explicitly in the authz file.
harry = rw
sally = r
Also, there is a section in the svnserv.conf file to look at:
harry has read/write access, and sally is read-only.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access=read
auth-access=write
There's more info here: http://www.visualsvn.com/support/svnbook/serverconfig/svnserve/
回答2:
- Side-note. I'm afraid, but selected methodology ignores old good rule "Commit often, commit fast". As result you may have big, less manageable commits, irregular and weak communication between developers and (most probably) less effective work as result. If you want to have place for stable code, you can and have to limit only part of repo for every-day commits (trunk or some branch), but allow unrestricted access of developers to other parts
- Method of administration for commit-policy heavy depends from used repo-backend (access protocol), you said nothing about this. Apache-served (or svn+ssh://) repositories use own methods.
PS - checkout/update is READ access, only commit is WRITE access to repository
来源:https://stackoverflow.com/questions/8523823/read-only-access-of-subversion-repository