Gitolite deny access to the directory on the main branch, but not in the user branch

Consider the following repo:

REPO / SRC / A /

REPO / SRC / B /

Is it possible that only 1 repo will fulfill the following restrictions?

  • In the main branch, allow full access to the role of attendants.
  • In the main branch, deny access to A, but allow role B for contributors.
  • In personal branches, allow full access to A and B creators.
+6
source share
2 answers

With Gitolite V3 or 'g3' and VREF , it should be possible to implement these limitations.

But the access you can control is only for access to the recording.
If the user can clone the repo, he will have read access to all repos (as indicated in " gitolite: allow only selected files to be modified ).
If you really want to restrict read access, you can try gitolite ' partial-copy ' .

A few notes:

access rule :

 <permission> <zero or more refexes> = <one or more users/user groups> 

<zero or more refexes> means you can combine repos

This will give something like (not verified):

 repo REPO RW+ master = MAINTAINER - master VREF/NAME/A = CONTRIBUTOR RW master VREF/NAME/B = CONTRIBUTOR RW personal/USER/ VREF/NAME/A = CREATOR RW personal/USER/ VREF/NAME/B = CREATOR 
+4
source
 repo REPO - master VREF/NAME/src/A = @contributors RW+ master = @maintainers @contributors RW+ personal/ = @creators 
0
source

Source: https://habr.com/ru/post/922564/


All Articles