Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We currently have an SVN repository setup and want to switch over to GIT, but we're currently not sure what exact GIT setup will work for us.

We're currently using SVN (w/ Authz) + Apache (w/ WebDAV & LDAP). We use Authz for SVN since we need fine access control to subdirectories in our repository (not every user should read/write all directories).

Is there a way to port this Authz permission file, so that the GIT repository uses this permission control? Or is there any other way we can control the permissions to GIT with a single file? Keep in mind that we have already LDAP installed, so the permission file should simply map usernames to authorized directories.

share|improve this question
up vote 1 down vote accepted

It would appear that you may have made the leap to git (it's not an acronym, by the way) a little prematurely -- because git's data storage and access control models are completely different to SVN.

Access control on a per-repository basis isn't hard; while I don't have any configuration examples to hand, it shouldn't be hard to emulate if you're using HTTPS access, because the authentication and authorisation model is much the same as with SVN. For per-branch access control, I know it can be done with gitolite (although that's an SSH access system by default, it could probably be mangled into using HTTPS with a bit of thought).

In theory, you could presumably do something with path-based access for writes using some cunningly crafted hooks, but you really can't do it for read access control, because the whole model of git is commits across an entire repo, so you can't stop people from seeing all the data in the repo.

share|improve this answer

No luck. You can't do it with any monolithic repository (contrary to path-based)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.