git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Does git have "Path-Based Authorization"?

From
Carlos Martín Nieto <cmn@elego.de>
Date
Oct 1, 2011, 00:05 UTC
Message-ID
<1317427503.4331.37.camel@centaur.lab.cmartin.tk>
In-Reply-To
<CAN0CFw0QXkNSF8+qGu+pCrv5dgy1OEvtq-53f23GRd4RrZ1GcQ@mail.gmail.com>
On Fri, 2011-09-30 at 16:43 -0700, Grant wrote:
> Hello, I'm trying to decide between git and subversion.  Subversion
> has "Path-Based Authorization" so I can give a developer access to
> only specific files instead of everything.  Does git have something
> similar?

Git's model does not allow the same type "Path-Based Authorization" that Subversion uses, because git uses secure hash sums to make sure that people don't try to sneak changes into a pull request or merge, and you can't selectively download parts of the tree because then you couldn't check that one of your remotes isn't trying to lie to you.

You can do something that is (or can be) similar with git and gitolite[0] so a developer (or set of developers) only has access to a particular set of branches. Depending on what exactly you're trying to do, this can be more or less complicated to set up. If you only want a set of developers to access the subdirectory clients/importantsecretclient, then you create that directory only in the branch or branches that developer can read. There are many examples int he gitolite wiki.

[0] https://github.com/sitaramc/gitolite/wiki/
HTH
   cmn
Previous: GrantNext: Grant
Message 2 of 15 in “Does git have "Path-Based Authorization"?”
  1. GrantSep 30, 2011
  2. Carlos Martín NietoOct 1, 2011
  3. GrantOct 1, 2011
  4. Nguyen Thai Ngoc DuyOct 1, 2011
  5. GrantOct 1, 2011
  6. david@lang.hmOct 1, 2011
  7. Jakub NarebskiOct 1, 2011
  8. GrantOct 2, 2011
  9. Sitaram ChamartyOct 2, 2011
  10. GrantOct 2, 2011
  11. Nguyen Thai Ngoc DuyOct 2, 2011
  12. GrantOct 2, 2011
  13. Andreas KreyOct 2, 2011
  14. Frans KlaverOct 2, 2011
  15. Enrico WeigeltOct 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.