哪个版本控制允许文件级别的访问权限?
我以前使用过 SVN,因为我有一个较大的项目,并且经常更换开发人员,所以我想在包或文件级别定义文件访问。例如,给予基本类的完全访问权限,但在某些情况下只允许特殊用户读取和提交。
是否有版本控制系统可以实现这一点,例如 GIT、CVS 或 SVN,或者是否有解决方法可以做到这一点?我没有自己的服务器,但我使用 Codesion 作为托管服务。
I have used SVN before and because I have a larger project which I have frequently changing developers working on I want to define file access on a package or file level. For example giving full access to basic classes, but only allow the reading and committing for special users in some cases.
Is there a version control system which would allow that, like GIT, CVS or SVN or is there a work around to do this? I do not have my own Server but I am using Codesion as a hosted service.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CVS 很糟糕(相比之下),你不应该碰这些东西。新的 DVCS(例如 Git、Hg、Bzr 等)不允许您设置比整个存储库级别更精细的读取权限。 (写入权限相当简单。)
您可以使用 SVN 设置细粒度的读/写权限(请参阅 书)。请注意,拒绝对存储库的某些部分进行读取访问是一个兔子洞。我建议将项目拆分为单独的(大部分是独立的)模块,并授予或拒绝对每个模块作为一个整体的访问权限。例如,
您可能还想退一步问自己为什么需要细粒度的访问。如果您担心开发人员偷走您的源代码,那么您就遇到了技术无法解决的深层问题。如果您担心存储库中的管理员密码,请删除管理员密码。我想说这种访问控制的主要用例是让客户通过 SVN 访问他们所购买的功能的代码。
CVS is horrible (by comparison) and you shouldn't touch the stuff. The new DVCSs such as Git, Hg, Bzr, etc. do not let you set read permissions finer than at the whole-repository level. (Write permissions are fairly easy.)
You can set fine-grained read/write permissions using SVN (see the book). Beware that denying read access to parts of a repository is a rabbit-hole. I recommend splitting the project into separate (mostly self-contained) modules and granting or denying access to each module as a whole. For example,
You might also want to step back and ask yourself exactly why you need fine-grained access. If you're worried about developers absconding with your source code, then you have deep problems that cannot be solved with technology. If you are worried about admin passwords in your repository, then remove the admin passwords. I would say the primary use case for this kind of access control is to give customers SVN access to the code for the features they have purchased.