开发者

git access permissions to repository files or paths

How would one prevent certain users from modifying certain paths or files in a repository? Actually, as I see it, this is something that would be controlled by the repository server (through hooks?) but also some local client policy control would be nice, as a way to warn user开发者_StackOverflow中文版s beforehand.

I understand that user/role management is not part of git, but I'm sure there are tools and scripts out there that people are using to do this kind of control. Unfortunately I can't find almost any information on the subject.


You can have hooks on client side as well to do the check ( ie in the git/hooks on the local clone. It can be a pre-commit hook - https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)

You can also consider using Gitolite for such purposes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜