-
-
Save jeremiah/32d7e696e86ca205509dfa5f9918ad3e to your computer and use it in GitHub Desktop.
systemd-unit for git-daemon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# conf.d file for git-daemon | |
# | |
# Please check man 1 git-daemon for more information about the options | |
# git-daemon accepts. You MUST edit this to include your repositories you wish | |
# to serve. | |
# | |
# Some of the meaningful options are: | |
# --syslog --- Enables syslog logging | |
# --verbose --- Enables verbose logging | |
# --export-all --- Exports all repositories | |
# --port=XXXX --- Starts in port XXXX instead of 9418 | |
# | |
GITDAEMON_OPTS="--syslog --base-path=/var/git" | |
# To run an anonymous git safely, the following user should be able to only | |
# read your Git repositories. It should not be able to write to anywhere on | |
# your system, esp. not the repositories. | |
GIT_USER="nobody" | |
GIT_GROUP="nobody" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Git Activation Socket | |
[Socket] | |
ListenStream=9418 | |
Accept=true | |
[Install] | |
WantedBy=sockets.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Git Repositories Server Daemon | |
Documentation=man:git-daemon(1) | |
[Service] | |
User=nobody | |
Group=nobody | |
EnvironmentFile=/etc/conf.d/git-daemon | |
# Ignore non-zero exit status, access error makes git-daemon return them | |
ExecStart=-/usr/libexec/git-core/git-daemon --inetd --base-path=/var/git --verbose $GITDAEMON_OPTS | |
StandardInput=socket | |
StandardOutput=inherit | |
StandardError=journal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HOWTO;
Edit [email protected] to your local configuration. particularly this line;
"ExecStart=-/usr/lib/git-core/git-daemon --inetd --base-path=/home/jeremiah/GENIVI/local-repos --verbose $GITDAEMON_OPTS"
Obviously on our git.projects.g.o server the base path is /srv/repositores/ and I've changed where you find the git-daemon to match Debian.
That should work.