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
      - master  = @admin
      RW+       = @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

    FAQ

    FATAL: R any xx yy DENIED by fallthru

    It happends once when I moved data from a server to another, all I had to do is gitolite setup for each user containing repos

    Otherwise go through doc