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

Re: Repository Security

From
APAndy Parkins <andyparkins@gmail.com>
Date
Jan 23, 2007, 15:00 UTC
Message-ID
<200701231500.34560.andyparkins@gmail.com>
In-Reply-To
<200701230823.17938.andre@masella.no-ip.org>
On Tuesday 2007 January 23 13:23, Andre Masella wrote:
Show 5 quoted lines
> Okay, say one regular developer wants share his changes with another
> developer. He either has to mail patches, create an SSH account, or set up
> one of git-daemon or WebDAV. And most of those require knowing the
> workstation name which is inconvienient. I would rather have each user able
> to push to a branch with their name on it on a central server.
So: developer1 is allowed to make changes to central's branch br/developer1, 
say.  How is the central server going to be sure that it is developer1 
connecting?  Probably a username and password.  In which case you have a user 
account - which is what you would have with ssh.  The difference would be 
that with ssh you would have full access to all the authentication and 
authorisation mechanisms of a standard UNIX system; LDAP, NIS, timed-logins, 
etc.  If git were to implement authorisation itself then it would need all 
these modules writing again.
I don't know if this would work with git, but once you had real users, you 
could simply do
 $ mkdir refs/heads/dev1
 $ chown dev1.developers refs/heads/dev1
 $ chmod 755 refs/heads/dev1
 $ chmod u+s refs/heads/dev1
And then only dev1 would be able to write references in refs/heads/dev1.

(The above is untested in git; but with a bit more work I'm sure it could be made to operate)

git has a marvellous property that it won't change objects in the object database - it will only add new objects. That makes it more difficult to do actual harm over the git-protocol. For my few users, who already had accounts, and are part of a group, I simply made a group-writeable SGID directory for git repositories, created the repositories, set the config and left them to it. With reflogs turned on, there is no damage they can do that can't be undone.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Previous: Johannes SchindelinNext: Jakub Narebski
Message 8 of 13 in “Repository Security”
  1. Andre MasellaJan 22, 2007
  2. Shawn O. PearceJan 22, 2007
  3. Andre MasellaJan 23, 2007
  4. Martin LanghoffJan 22, 2007
  5. Johannes SchindelinJan 23, 2007
  6. Andre MasellaJan 23, 2007
  7. Johannes SchindelinJan 23, 2007
  8. Andy ParkinsJan 23, 2007
  9. Jakub NarebskiJan 23, 2007
  10. Andre MasellaJan 23, 2007
  11. Johannes SchindelinJan 23, 2007
  12. Andreas EricssonJan 24, 2007
  13. Linus TorvaldsJan 23, 2007

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.