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-apcf.conf | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 etc/httpd/conf.d/git-http-apcf.conf (limited to 'etc/httpd/conf.d/git-http-apcf.conf') diff --git a/etc/httpd/conf.d/git-http-apcf.conf b/etc/httpd/conf.d/git-http-apcf.conf new file mode 100644 index 0000000..d781aea --- /dev/null +++ b/etc/httpd/conf.d/git-http-apcf.conf @@ -0,0 +1,27 @@ +# +# +# Git Smart HTTP Support (authenticated read/write) +# git push, clone, fetch — ALL authenticated + +SetEnv GIT_PROJECT_ROOT /srv/git +SetEnv GIT_HTTP_EXPORT_ALL 1 + +# Expose all of the endpoints. +ScriptAliasMatch "^(/.+/(git-upload-pack|git-receive-pack|info/refs))$" \ + /usr/libexec/git-core/git-http-backend$1 + +# Globally authenticate for each endpoint. + + AuthType Basic + AuthName "Git Access" + AuthUserFile ${GIT_HTTP_AUTH_FILE} + Require valid-user + + +# info/refs strictly scoped + + + Require expr %{QUERY_STRING} == "service=git-upload-pack" + Require expr %{QUERY_STRING} == "service=git-receive-pack" + + -- cgit v1.2.3-70-g09d2