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

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

From
GGrant <emailgrant@gmail.com>
Date
Oct 2, 2011, 03:34 UTC
Message-ID
<CAN0CFw3ZDcXtD7WChjkT1Vg0cU_u==4KCHo8ff-ccbyxZ8xWjg@mail.gmail.com>
In-Reply-To
<CACsJy8B2rhXvGKUsu10Po8cCi7p8uqWXWE5ZHB2Z6hH-aMyR2Q@mail.gmail.com>
Show 20 quoted lines
>> How would something like that work in a case like mine where I have a
>> series of maybe 100 files and I only want to give my developer
>> read/write access to one or a few files at a time with no read or
>> write access to any of the other files?  Wouldn't setting up a
>> different repo for each set of files be difficult to manage?
>
> The write part is easy. Just setup hooks to reject updates on those
> files (however, notice the offline nature of git, people may commit
> locally and the push later, you may need to check commit time on your
> hooks).
>
> The reading part is hard, especially the way you put it ("at a time").
> The only way I can think of is to not download those objects and try
> to fetch from central repo every time the objects are read,
> essentially turn git into a central scm again. Git does not support
> this and may never do unless there's an reasonable use case.
>
> So I have to ask, why do you do it this way? Once you give read-access
> to a developer, he/she can always save the files somewhere, revoking
> read access later on would be useless.

That's true. I hope to be able to give different developers access to different parts of the code. I really don't know if this will work. I just don't want my code to be stolen and I'm trying to find some way to prevent that from happening.

- Grant
Previous: Nguyen Thai Ngoc DuyNext: Andreas Krey
Message 12 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.