[Ovirt-devel] enforcing the no-push-to-master policy
Jim Meyering
jim at meyering.net
Wed Jul 16 16:51:38 UTC 2008
FYI, as any of you with commit access know,
we now have a policy that limits commits to "master".
Most development is expected to take place on the "next" branch.
To enforce that policy, I've just added a server-side
commit hook. For details, see the new README file
on the new vcs-admin branch:
http://git.et.redhat.com/?p=ovirt.git;a=blob_plain;f=README;hb=3b159148c1bb
Denying/granting push access to a branch:
========================================
Prerequisites:
- you need shell access to the git server host
- you must be a member of the ovirt-adm group
To lock a branch (e.g., "master"),
ssh SERVER git --git-dir=/var/www/git/ovirt.git \
config hooks.denypush.branch.master contact-email at example.com
To unlock it:
ssh SERVER git --git-dir=/var/www/git/ovirt.git \
config --unset hooks.denypush.branch.master
[
Note to self, to set this up on a fedora/RHEL-based system:
g=ovirt-adm
repo=/var/www/git/ovirt.git/config
groupadd $g
for u in user1 user2 user3; do usermod -a -G $g $u; done
chgrp $g $repo && chmod g+w $repo
]
More information about the ovirt-devel
mailing list