Thread (17 messages) flat view 17 messages, 10 authors, 2016-06-15

Re: Git and securing a repository

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:02


On Wed, 2 Jan 2008, Gonzalo Garramu?o wrote:
I was really looking for a permission based system that was part of git itself
(and thus more portable and easier to admin), and not the OS. Something akin
to what perforce or even CVS can do.
Well, git by design doesn't do that. 

That doesn't mean that it has to be OS-level permissions (in fact, it 
generally shouldn't), it just means that git wasn't really meant to care 
about permissions itself, and you the user management and permissions 
should come from "outside".

That outside *can* be OS-level things like just permissions on files, but 
more commonly it's things like SSH keys and using the git hooks. In other 
words, pretty much by design, git is meant to be the *core* SCM 
infrastructure, and then you layer your user management on top of it as a 
*separate* layer.

An example of that would probably be gitosis, but I haven't used it 
myself. For the kernel, people literally tend to just use SSH accounts, 
and not any central repository at all (ie the kind of crazy "central repo 
access control rules" that centralized repos need are just not necessary 
at all in a more distributed usage model).

See 

	http://eagain.net/gitweb/?p=gitosis.git
	http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way

for a quick starting point on gitosis, if that suits your needs (there's 
more, google is your friend).

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help