Subject: Re: how to restrict git to specific non-root superuser

From: Neal Kreitzinger <[email-masked]>
Date: Fri, 04 May 2012 22:29:42 -0500

On 5/4/2012 8:48 PM, Neal Kreitzinger wrote:
> I work on systems where 'everyone' has the root password (that problem
> is somewhat out of my hands). Is there a technique to setup git so that
> only a certain non-root superuser (ie, gittech) is allowed to run git
> commands? I don't want people logged in as root to mess up the git repos.
>
> I'm considering using git for deployment and some anonymous root user
> messing it up would be a very, very, bad thing. Maybe this proposition
> is theoretically impossible. Maybe someone has implemented this concept
> in practice.
>
I'm thinking a way to achieve this effect is:

install git under the home dir of the 'gittech' user and add that path 
only to the PATH of 'gittech'.

have the git repos under the 'gittech' home dir with worktree(s) 
assigned to deployment locations.  If people mess with the worktrees I 
will be able to tell with git status via 'gittech'.

v/r,
neal