Changes between Version 2 and Version 3 of Enforce umask setting for new gitolite repos


Ignore:
Timestamp:
04/29/25 21:52:51 (4 weeks ago)
Author:
enno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Enforce umask setting for new gitolite repos

    v2 v3  
    1 On your gitolite server
     1== Background
    22
    3 * Change to the /home/git/ directory
     3By default, only the git user can access Gitolite repositories, as they are created with strict permissions.
    44
    5 * Edit .gitoliterc
     5In our setup, however, the tracd service also needs read access to these repositories.
    66
    7 * Change the umask setting from 0077 (default) to 0027 to allow users of group git e.g. tracd to read the repository
     7To enable this, we added the tracd user to the git group and configured Gitolite to allow group access by adjusting the default permissions for new repositories.
    88
    9 NOTE: This will be applied to all '''new''' repos
     9=== Change umask
     10
     11On your Gitolite server:
     12
     13* Switch to the Gitolite user directory:
     14
     15{{{#!sh
     16cd /home/git
     17}}}
     18
     19* Open the .gitolite.rc configuration file in your editor.
     20
     21* Locate the UMASK setting and change it:
     22
     23From:
     24
     25$UMASK = 0077;
     26
     27To:
     28
     29$UMASK = 0027;
     30
     31----
     32
     33This change allows members of the git group — such as the tracd user — to read new repositories created by Gitolite.
     34
     35Note: This change only affects new repositories created after updating the UMASK. Existing repositories will retain their current permissions unless manually adjusted. Even manually adjusted permissions will be reverted after guix system reconfigure, thus cloning or copying existing bare repos into /home/git/repositories will cause hard to track problems
     36
     37📥
     38The most straightforward way to import an existing repository is to let gitolite create an empty repo, add this as a remote and push from your existing repo