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-cf.conf | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 etc/httpd/conf.d/git-http-cf.conf (limited to 'etc/httpd/conf.d/git-http-cf.conf') diff --git a/etc/httpd/conf.d/git-http-cf.conf b/etc/httpd/conf.d/git-http-cf.conf new file mode 100644 index 0000000..0d4302e --- /dev/null +++ b/etc/httpd/conf.d/git-http-cf.conf @@ -0,0 +1,26 @@ +# +# +# Git Smart HTTP Support (readonly) +# clone/fetch ONLY + +SetEnv GIT_PROJECT_ROOT /srv/git +SetEnv GIT_HTTP_EXPORT_ALL 1 + +# Expose git-upload-pack and info/refs. +ScriptAliasMatch "^(/.+/(git-upload-pack|info/refs))$" \ + /usr/libexec/git-core/git-http-backend$1 + +# No authentication needed for git clone/fetch. + + Require all granted + + +# Only allow info/refs for git clone/fetch. + + Require expr %{QUERY_STRING} == "service=git-upload-pack" + + +# Explicitly deny git push just in case. + + Require all denied + -- cgit v1.2.3-70-g09d2