git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* disable branch modification
@ 2009-07-18 18:16 Ishaaq Chandy
  2009-08-04 13:36 ` Andreas Ericsson
  2009-08-04 16:50 ` Alex Riesen
  0 siblings, 2 replies; 3+ messages in thread
From: Ishaaq Chandy @ 2009-07-18 18:16 UTC (permalink / raw)
  To: git


Hi all,
I've got a remote git repository that I want multiple users to be able to
push to. This is all set up fine and working beautifully. The only thing is,
I want to be able to lock down the branches on this remote repo, once set up
users should not be able to:

1. Create new branches on it
2. Delete existing branches from it
3. push non-fast-forward commits to it.

I think I'll need to write a pre-receive hook for this, but before I embark
on this, any helpful pointers would be appreciated.

Thanks,
Ishaaq
-- 
View this message in context: http://www.nabble.com/disable-branch-modification-tp24550469p24550469.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: disable branch modification
  2009-07-18 18:16 disable branch modification Ishaaq Chandy
@ 2009-08-04 13:36 ` Andreas Ericsson
  2009-08-04 16:50 ` Alex Riesen
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Ericsson @ 2009-08-04 13:36 UTC (permalink / raw)
  To: Ishaaq Chandy; +Cc: git

Ishaaq Chandy wrote:
> Hi all,
> I've got a remote git repository that I want multiple users to be able to
> push to. This is all set up fine and working beautifully. The only thing is,
> I want to be able to lock down the branches on this remote repo, once set up
> users should not be able to:
> 
> 1. Create new branches on it
> 2. Delete existing branches from it
> 3. push non-fast-forward commits to it.
> 
> I think I'll need to write a pre-receive hook for this, but before I embark
> on this, any helpful pointers would be appreciated.
> 

I did this once so that users could only push to branches in a namespace
beginning with their username, so the user "hgb" could only write to
"hgb/master" and never to "master" directly (for example). This provides
maximum freedom to the users while making sure they never muck about with
any "official" branches.

The script to accomplish this is, alas, lost.

Denying non-fast-forwards even if --force is in effect is a config option
these days, I think.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: disable branch modification
  2009-07-18 18:16 disable branch modification Ishaaq Chandy
  2009-08-04 13:36 ` Andreas Ericsson
@ 2009-08-04 16:50 ` Alex Riesen
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Riesen @ 2009-08-04 16:50 UTC (permalink / raw)
  To: Ishaaq Chandy; +Cc: git

On Sat, Jul 18, 2009 at 20:16, Ishaaq Chandy<ishaaq@gmail.com> wrote:
> 1. Create new branches on it
> 2. Delete existing branches from it

You cannot have these.

> 3. push non-fast-forward commits to it.
>
> I think I'll need to write a pre-receive hook for this, but before I embark
> on this, any helpful pointers would be appreciated.

Look in the mailing list archives for pre-receive, update and SSH,
there were some good examples of update and pre-receive posted.
Also, there is contrib/hooks/update-paranoid in Git repo. It
implements an ACL per SSH user.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-04 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-18 18:16 disable branch modification Ishaaq Chandy
2009-08-04 13:36 ` Andreas Ericsson
2009-08-04 16:50 ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).