]> source.dussan.org Git - gitea.git/commitdiff
systemd service: Add commented PATH environment option for Git prefix (#13170)
authorBagas Sanjaya <bagasdotme@gmail.com>
Sat, 24 Oct 2020 21:13:59 +0000 (04:13 +0700)
committerGitHub <noreply@github.com>
Sat, 24 Oct 2020 21:13:59 +0000 (17:13 -0400)
On some setups, Git is installed to directory prefix other than default
PATH (such as /opt/git/bin). For Gitea to know such Git installations,
PATH environment must be specified on service file.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
contrib/systemd/gitea.service

index 73e838c23bfc82fecf6f61ccb9dd4c40465d219a..ac6a13ec573e75577ee1552e3f3ef7c6a9f3de06 100644 (file)
@@ -57,6 +57,12 @@ WorkingDirectory=/var/lib/gitea/
 ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 Restart=always
 Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
+# If you install Git to directory prefix other than default PATH (which happens
+# for example if you install other versions of Git side-to-side with
+# distribution version), uncomment below line and add that prefix to PATH
+# Don't forget to place git-lfs binary on the PATH below if you want to enable
+# Git LFS support
+#Environment=PATH=/path/to/git/bin:/bin:/sbin:/usr/bin:/usr/sbin
 # If you want to bind Gitea to a port below 1024, uncomment
 # the two values below, or use socket activation to pass Gitea its ports as above
 ###