4 ms·
gitolite has amazingly powerful access control, not just per-repo but per-branch or per-directory within a repo. It has very flexible self-service features, if
by fanf2 10y ago
gitolite has amazingly powerful access control, not just per-repo but per-branch or per-directory within a repo. It has very flexible self-service features, if you are OK with remote commands over ssh. Lots of nice scripting hooks.
Gitolite home page: http://gitolite.com/gitolite/ http://gitolite.com/gitolite/
I run a multi-tenant gitolite setup for the University of Cambridge: https://git.csx.cam.ac.uk/ https://git.csx.cam.ac.uk/
- mnutt 10y agoI've run a ~30-user, ~1000-repo gitolite instance for a few years and while it has done its job admirably, there are a couple of things to know about: It has a pretty clever config management system where the configuration is actually committed to a git repo. It's great if you're managing configuration by hand, but was difficult to automate via chef. In order to let users create their own repos, we enabled "wild repos". It's as simple as a `git clone` with the desired repo name, which is great except that users often make typos and end up accidentally creating typo'd repos. The only person who can delete repos is the user who created them or the server admin deleting directories. Perhaps there are better features I should have used?
- fanf2 10y agoWild repos are the self-service thing I referred to. You can turn off auto-create, so users have to explicitly run the `create` command - I did this, and typos have not been a problem for my users. The other niggle is the `perms` command is not as easy to use as I would like. But on the whole gitolite with wild repos has been really low-maintenance.
- kingosticks 10y agoCould you point to the documentation regarding per-directory access control? I find the documentation very difficult to navigate and I can't find anything relevant. I'm also not sure how it could work.
- majewsky 10y ago> I'm also not sure how it could work Git repos can have an "update hook" that is executed during a push, after the new commits have been uploaded, but before the branch is updated to include the new commits. The hook can inspect the new commits, compare them to the old ones, and decide to reject the update. (It's a shell script, so every imaginable condition is possible.)
- kingosticks 10y agoBut that cannot prevent read access on a per-directory basis. I appreciate now that's not what you were referring to. I did find http://gitolite.com/gitolite/list-non-core/#partial-copy-selective-read-control-for-branches http://gitolite.com/gitolite/list-non-core/#partial-copy-sel... which seems to almost do what I wanted but that'll quickly explode to many copies of copies for any non-trivial situation. I know git can't do what I'm asking but every now and then something comes along and I gives me some hope before reality sets in.
- fanf2 10y agoI do have a colleague using a partial copy, but if you need fine-grained read access control, you either need lots of git repos, or a different version control system.