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

Re: Question around git-shell usage in Everyday Git

From
Junio C Hamano <junkio@cox.net>
Date
Feb 2, 2006, 05:44 UTC
Message-ID
<7vbqxqxqk7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200602020517.05827.alan@chandlerfamily.org.uk>
Alan Chandler <alan@chandlerfamily.org.uk> writes:
Show 6 quoted lines
> Then each developer would access the repository via
>
> URL:home.chandlerfamily.org.uk:projectx.git
>
> but would be only allowed access if they were on a white list within each 
> project.

This is the part I highly doubt is doable -- without having separate unix level UID your whitelist mechanism would not work. And I do not think you would get separate unix level UID without having separate $HOME/.ssh directory, even if you have prepared separate unix level UID in your /etc/passwd file.

Come to think of it, it is worse than that. IIRC, sshd has rather strict check to make sure that only one unix user can write into $HOME/.ssh/ directory (obviously the owner of that $HOME directory, which means the user who has the directory as her home directory in /etc/passwd). If more than one unix level user shares a home directory, I do not think you can satisfy that checking.

Maybe it does not matter, since they will be pushing the commits with their name set to committer/author fields and if you trust them, but then there is no point assigning one UID per user.

One UID per project is probably doable but I do not think that is a useful arrangement either.

> So the third approach I am now contemplating is to actually create separate 
> users for each project

You still cannot distinguish your users in a project with each other, which may or may not matter to you. Also this is inconvenient for your developer who works on more than one of your projects -- I think he needs to use one project identity for each.

So in short, I am mildly negative about this. If I were doing this kind of thing I'd have one unix UID and one directory per one physical user. What is the real reason (other than "I just do not want to" feeling) you want to have smaller number of home directories than you have users?

Previous: Alan ChandlerNext: Alan Chandler
Message 7 of 9 in “Question around git-shell usage in Everyday Git”
  1. Alan ChandlerFeb 1, 2006
  2. Junio C HamanoFeb 1, 2006
  3. Junio C HamanoFeb 1, 2006
  4. Linus TorvaldsFeb 1, 2006
  5. Junio C HamanoFeb 2, 2006
  6. Alan ChandlerFeb 2, 2006
  7. Junio C HamanoFeb 2, 2006
  8. Alan ChandlerFeb 2, 2006
  9. Linus TorvaldsFeb 1, 2006

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.