Gitolite

    documentation

    Installation

    Package: gitolite

    useradd -m projects

    ssh-keygen -t rsa -b 2048 -N "nopassword" -f /tmp/id_rsa

    Notice: Optional if you have already public key.

    dpkg-reconfigure gitolite

    Note: this command allow also to create a new repositories directory.

    Configuration

    .gitolite.rc

    $REPO_UMASK = 0077; # gets you 'rwx------'
    

    gitolite.conf

    repo    test1
      RW+		= @admin
      - master	= @dev
      RW		= @dev
    
    # source: https://groups.google.com/g/gitolite/c/d2M8Aks_aAw
    repo  test2
      RW master = @admin
      RW+ [^m][^a][^s][^t][^e][^r] = @admin
    

    Notes:

    • admin group can do anything on test1, but cannot rewind/rebase on other branches than master on test2
    • dev group can do nothing on branch master of test1, but can create any other branches on test1, except rebase/rewind on these other branches