Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using gitosis to specify permissions per branch?

With gitosis, is it possible to specify write permissions so that users can push freely to branches with their own name, but not merge with the master? E.g. $USER/test1 .. $USER/test5

This mean you could host just one repository per project, rather than hosting multiple repositories for the same project, specific to each user:

 project1-user1
 project1-user2
 project1-user3
 ...
 project5-user1
 project5-user2
 project5-user3
like image 251
Alexandra Franks Avatar asked Feb 23 '09 22:02

Alexandra Franks


2 Answers

The Gitolite project offers this functionality. It's a rewrite of Gitosis in Perl. Its code can be found on github

When I first wrote this answer, it didn't support gitweb or git-daemon integration, but it does now.

like image 91
Phil Miller Avatar answered Oct 12 '22 22:10

Phil Miller


This script seems to do per branch access control:

http://www.kernel.org/pub/software/scm/git/docs/howto/update-hook-example.txt

like image 26
Surki Avatar answered Oct 12 '22 20:10

Surki