threads / discuss / 17446

Security and permissions in git

Subject: Security and permissions in git

## tl;dr

3 messages between Jan 29, 2009 and Jan 29, 2009.

replies: 2people: 3as markdown or json

Jay Renbaum· Jan 29, 2009, 20:34 UTC · lore

When setting up a public repository is there a way to control who has access to various directories within the repository or is everything equal once you are in?

Daniel Barkalow· Jan 29, 2009, 22:13 UTC · re: Jay Renbaum · lore

Re: Security and permissions in git

On Thu, 29 Jan 2009, Jay Renbaum wrote:
> When setting up a public repository is there a way to control who has access 
> to various directories within the repository or is everything equal once you 
> are in?

Every commit contains a version of the complete contents, so people have to be able to read the contents of all directories and write some directory contents. However, you can prohibit users from pushing content to the repository unless particular directories (or files) match what's there already. This is generally what people want when they have this requirement.

It's also possible to use submodules to have a project contain parts that some users don't have any access to, while still being able to produce commits to the main project (in combination with the above check so that try can't replace the submodule entirely with content they do have access to, or submodule commits they've seen referenced previously)

	-Daniel
*This .sig left intentionally blank*
Jeff King· Jan 29, 2009, 23:23 UTC · re: Daniel Barkalow · lore

Re: Security and permissions in git

On Thu, Jan 29, 2009 at 05:13:41PM -0500, Daniel Barkalow wrote:
Show 6 quoted lines
> Every commit contains a version of the complete contents, so people have 
> to be able to read the contents of all directories and write some 
> directory contents. However, you can prohibit users from pushing content 
> to the repository unless particular directories (or files) match what's 
> there already. This is generally what people want when they have this 
> requirement.

If this is what you want, see Shawn's contrib/hooks/update-paranoid, which lets you specify ACLs in the config.

-Peff

← back to recent threads