Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

up vote 2 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

 
discard

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.