Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

How to prevent changes to repository by root

From: Nazri Ramliy <hidden>
Date: 2016-06-15 22:48:57

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.

Murphy's law and all, someone is bound to do "git pull" as root on that repo
and that would sometime cause problem for the non-privileged user (who 'own')
the git repo to do subsequent git operations on that repository.

My question is:

How do I limit any action on this repository to this non-privileged user only?

I looked at "git help hooks" thinking that maybe I can use one of the hooks to
add return "test $USER = foo" but from the descriptions there it is
not clear which
hook is the one that applies to this case (limit all repository action
on this repository
to this user only)

Any ideas?

Thanks in advance for any help.

nazri.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help