summary refs log tree commit diff
path: root/gnu/services/version-control.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2020-10-05 17:47:13 +0200
committerJulien Lepiller <julien@lepiller.eu>2020-10-05 19:41:23 +0200
commit4e3ed9bad9ed5758cdee6e636805f65e9ab710eb (patch)
tree8f017d4a9d67d929327acf9e827c351ba520e649 /gnu/services/version-control.scm
parentc14714cbbfe9239410aec2ed73282192a64fbbdc (diff)
downloadguix-4e3ed9bad9ed5758cdee6e636805f65e9ab710eb.tar.gz
services: gitolite: Install the rc file as gitolite's user.
* gnu/services/version-control.scm (gitolite-activation): Install the rc
file as gitolite's user.
Diffstat (limited to 'gnu/services/version-control.scm')
-rw-r--r--gnu/services/version-control.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index cc07f8025b..f3df0b979f 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -307,10 +307,15 @@ access to exported repositories under @file{/srv/git}."
                 (pubkey-file (string-append
                               #$home "/"
                               (basename
-                               (strip-store-file-name admin-pubkey)))))
+                               (strip-store-file-name admin-pubkey))))
+                (rc-file #$(string-append home "/.gitolite.rc")))
 
            (simple-format #t "guix: gitolite: installing ~A\n" #$rc-file)
-           (copy-file #$rc-file #$(string-append home "/.gitolite.rc"))
+           (copy-file #$rc-file rc-file)
+           ;; ensure gitolite's user can read the configuration
+           (chown rc-file
+                  (passwd:uid user-info)
+                  (passwd:gid user-info))
 
            ;; The key must be writable, so copy it from the store
            (copy-file admin-pubkey pubkey-file)