Re: How to prevent changes to repository by root
- From
- Aneurin Price <aneurin.price@gmail.com>
- Date
- Jun 16, 2010, 16:09 UTC
- Message-ID
- <AANLkTikPNH1ueb5m8JpiB2hU4afd3hv-4qYqSO3QPujl@mail.gmail.com>
- In-Reply-To
- <AANLkTikLixhYITdJKMFb3Hw2hZvaas1DtiV3x9ThCTZz@mail.gmail.com>
On Mon, Jun 14, 2010 at 04:12, Nazri Ramliy <ayiehere@gmail.com> wrote:
Show 6 quoted lines
> I have a git repository owned by a non-privileged user account on a > machine that is logged into (via ssh) by multiple users. These multiple users, > all of them (not at at the same time) do "git pull" on this repository. > > Everything is fine as long as they don't do the "git pull" as root. >
Is there ever any requirement for them to run git as root?
How are they becoming root? If they are using sudo you could forbid running git as root. If they are using su or logging in directly maybe you can get away with some trivial thing like putting 'alias git=/bin/false' in /root/.bashrc - or some wrapper which does something helpful rather than silently fail :-).
Nye