Last Updated: February 25, 2016
·
904
· eosrei

Change Gitolite settings to make repos visible to Gitweb

By default repositories created by gitolite have a umask 0007. This results in repos only readable by the gitolite user. Ideally you don't have Apache/nginx running as the gitolite user, so how do you adjust the permissions?

Easy!

Edit your .gitolite.rc file. Change the UMASK from 0007 to 0027.

From this:

%RC = (

    # ------------------------------------------------------------------

    # default umask gives you perms of '0700'; see the rc file docs for
    # how/why you might change this
    UMASK                           =>  0007,

To this:

%RC = (

    # ------------------------------------------------------------------

    # default umask gives you perms of '0700'; see the rc file docs for
    # how/why you might change this
    UMASK                           =>  0027,

You'll need to add your webserver user to the gitolite user group, and manually change any repositories created before the change.