From 00dffa8cf5cac8322cb47f2222e424d3960e7939 Mon Sep 17 00:00:00 2001 From: RATDAD Date: Sat, 13 Dec 2025 21:00:08 -0500 Subject: Added Git Smart HTTP Support --- etc/httpd/conf.d/git-http-p.conf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 etc/httpd/conf.d/git-http-p.conf (limited to 'etc/httpd/conf.d/git-http-p.conf') diff --git a/etc/httpd/conf.d/git-http-p.conf b/etc/httpd/conf.d/git-http-p.conf new file mode 100644 index 0000000..b30ad47 --- /dev/null +++ b/etc/httpd/conf.d/git-http-p.conf @@ -0,0 +1,35 @@ +# +# +# Git Smart HTTP Support +# git push ONLY + +SetEnv GIT_PROJECT_ROOT /srv/git +SetEnv GIT_HTTP_EXPORT_ALL 1 + +# Expose git-receive-pack and info/refs. +ScriptAliasMatch "^(/.+/(git-receive-pack|info/refs))$" \ + /usr/libexec/git-core/git-http-backend$1 + +# Authenticate against git push. + + AuthType Basic + AuthName "Git Push Access" + AuthUserFile ${GIT_HTTP_AUTH_FILE} + Require valid-user + + +# Deny info/refs push unless it's for git push. + + AuthType Basic + AuthName "Git Push Access" + AuthUserFile ${GIT_HTTP_AUTH_FILE} + + Require expr %{QUERY_STRING} == "service=git-receive-pack" + Require valid-user + + + +# Explicitly deny git clone/fetch just in case. + + Require all denied + -- cgit v1.2.3-70-g09d2