Created
August 4, 2015 06:19
-
-
Save moschlar/9b57eec3a2a8483e7e43 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
@jankal It should be [email protected] with the at-sign attached. I think that might be the issue. Also, it's the socket that needs to be enabled and started for Git, not the service.