Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Saturday, January 5, 2013

Gitolite - permissions examples

Attention: Gitolite version 2.
Deny permission completely(no access for clone) for user @trial user group, all other full access:


@trial  = denis


repo    my_repo
   - =   @trial
   RW+  =   @all
   config gitolite-options.deny-repo = 1


Give user Jenkins permission only for Read/Fetch/Clone, all other full access:

repo    my_repo
   R    =   jenkins
   -    =   jenkins
   RW+  =   @all

Forbid "git push --force" for 'master' branch only to avoid repository history damage, all other branches could be rewinded ('--force'):

repo    my_repo
   RW  master  = @all
   -   master  = @all
   RW+         = @all



Examples: site1, site2,

Friday, December 14, 2012

Gitolite - get access to repository for all users except for one

All is written in manual :), it only takes a bit time to read all, try a lot to make it work.

general description about rules: http://sitaramc.github.com/gitolite/rules.html
Nuances about deny meaning: http://sitaramc.github.com/gitolite/g2/aac.html#deny

Deny - does not forbid read access by default.

Mu config, to give access to all except for mihail (trial group) that have access only to project3:

@trial    =  mihail

repo    project1
        -       =   @trial
        RW+     =   @all
        config gitolite-options.deny-repo = 1


repo    project2
        -       =   @trial
        RW+     =   @all
        config gitolite-options.deny-repo = 1


repo    project3
        RW+     =   @all