Read-only access of Subversion repository

不羁的心 提交于 2019-12-22 06:57:40

问题


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:


  1. 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
  2. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!