From 02c949d5d304c87fd588a1b486b6db0903432f1c Mon Sep 17 00:00:00 2001 From: G-Huber <37844848+G-Huber@users.noreply.github.com> Date: Tue, 31 Oct 2023 23:13:46 +0100 Subject: [PATCH 1/2] Update DOCUMENTATION.md Explain possible pitfall when using git with systemd --- DOCUMENTATION.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 663ffef1f..15a91b6c1 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -528,6 +528,16 @@ git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s) The command gets executed after every change to the storage and commits the changes into the **git** repository. +For the hook to not cause errors either **git** user details need to be set and match the owner of the collections directory or the repository needs to be marked as safe. + +When using the systemd unit file from the [Running as a service](#running-as-a-service) section this **cannot** be done via a `.gitconfig` file in the users home directory, as Radicale won't have read permissions! + +In `/var/lib/radicale/collections` run: +```bash +git config user.name "radicale" +git config user.email "radicale@example.com" +``` + ## Documentation ### Configuration From 4cac895901aae69bf4c0b960fbdef0b8a86801cd Mon Sep 17 00:00:00 2001 From: G-Huber <37844848+G-Huber@users.noreply.github.com> Date: Wed, 1 Nov 2023 08:38:02 +0100 Subject: [PATCH 2/2] Update DOCUMENTATION.md Mention correct directory for git config --- DOCUMENTATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 15a91b6c1..95cf7b307 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -532,7 +532,7 @@ For the hook to not cause errors either **git** user details need to be set and When using the systemd unit file from the [Running as a service](#running-as-a-service) section this **cannot** be done via a `.gitconfig` file in the users home directory, as Radicale won't have read permissions! -In `/var/lib/radicale/collections` run: +In `/var/lib/radicale/collections/.git` run: ```bash git config user.name "radicale" git config user.email "radicale@example.com"