GIT-HTTP-BACKEND(1) >>>>>>> >>>>> >>>>>
>>> (NAME)
git-http-backend - >>>>>>>>>> >>>
>>>> >>> >> >>>> >>>>>> HTTP
>>>>> >>>>> (SYNOPSIS)
git http-backend
>>>>>>> (DESCRIPTION)
>> >>>>>> >>>> CGI >>>> >>>>>
>>>>>>> >> >>>> >>> >>
>>>>>>>>>> >>> >> >> >>>>
>>>>>>>>>> http:// > https:// >> >>>>
>>>>>> >>>>>. >>> >>>>>> >>
>> >>>>>> (fetch) >>>>>>>>> >>
>>>>>>> >> >>>>>> >>>>>> HTTP
(smart HTTP) > >>>>>> >>>>>> >>
>>>>> >>>> HTTP (dumb HTTP)> > >> >>
>>>>> (push) >>>>>>>>> >>
>>>>>>> >> >>>>>> >>>>>> HTTP
>>>>>>>> >>>>>>. >>>>>> >>
>>>> >>>>>>>> >>>>>> >>
>>>>>> >>>>>>>> >>>> > ("v2")
>>> >>>>>>>> >>>>>>>>> >>
>>>>>>> >>>>> >> GIT_PROTOCOL >>
>>> >>>>>>>> >>>>> >>
>>>>> >>>>>> >>>>.
>>> >>>>>> >>>>> >>>>>> >>
>>> >>>>>>>>> >>>>> >>>>
>>>> "git-daemon-export-ok" >>> >> >>>> >
>> >>>> >>>> >> >>>>>>>>>
>>> >> >>>>>>> >> >>> >>>
>>>> >>>> >>>> >>>> >>>>
>>>>>>> >>>>> >>> (>>>
>>>>> >>>>> >>>>> GIT_HTTP_EXPORT_ALL
>>>>> >>> >>>>).
>>>>>> >>>>>>>> >>>>
>>>>> upload-pack >>>> >>> >> >>
>>>>>>>>>> git fetch-pack > git ls-remote
>>>>>>>>> >>>>>>> >>>
>>>>>>>>> >> git fetch> git pull > git clone
>>>>>>>> >>>>>>>. >>>
>>>>>> >>>>> >>>> >>>
>>>>> >>>>> receive-pack >>>>
>>>>>> >> >> >>>>>>>>>> git
send-pack >>>>>>>>> >>>>>> >> >>
git push >>>>>>>> >>>>>>.
>>>>>>>> (SERVICES)
>>> >>>>>>>> >> >>>>>>> >>
>>>>>>> >> >>>> >>>>>>>>
>> >>>> >>>>/>>>>>>> >>>:
http.getanyfile
>>> >>>> >> >>>>>>>>>>
>>> >>>>>>>> >> >>>> 1.6.6 >>
>>>> >> >>>>>>> >> >>>>>
upload pack >>>>>> >>>>>>>>>
>>>>>>. >> >>>> >>>>
>>>>> >>>>>>>>> >>>>>>
>> >>>>> >> >> >>>>
>>>>>>>> >> >>>> >>>>>>
>> >>>> >> >>>> >>>
>>>>>>> >>>> >>>>>>>
>>>>>> >>> >>>>>> >>>>
>>>>>. >>> >>>>> >>>>>>
>>>>>>> >>>> >>>> >>> >>
>>>> >>>>>>>> >> >>>>>
>>> >>>>> >>>>>>>> >>> false
>> >> >>>>>>> >>>.
http.uploadpack
>>> >>>> >> >>>>>>>>>> git
fetch-pack > git ls-remote >>>>>>>>>
>>>>>>. >>> >>>>> >>>>>>
>>>>>>> >>>> >>>> >>> >>
>>>> >>>>>>>> >> >>>>>
>>> >>>>> >>>>>>>> >>> false
>> >> >>>>>>> >>>.
http.receivepack
>>> >>>> >> >>>>>>>>>> git
send-pack >>>>>>>>> >>>> >
>>>>> push >> >>>>>>. >>>
>>>>> >>>>>> >>>>>>>
>>>> >>>>>>> >>>>>>
>>>>>>> > >>>> >>>>>>>>
>> >>>> >>>>>>> >>>>>
>>>> >>>>>>> >>>> >>>.
>>>>>>> >> >> >> >>>>>
>>> >>>>> >>> false >>>>>>>
>>>> >> >> >>>>> >> >>> true
>>>> >>> >>>>>>>> >> >>>>
>>>>>>> >>>>>>> >>>>
>>>>.
http.uploadarchive
>>> >>>> >> >>>>>>>>>> git
archive >>> >>>>> >>>>>
>>>>>> >> >>>>
>>>>>>>>>> HTTP/HTTPS
>>>>>>>>> >>>>>>. >>>
>>>>> >>>>>> >>>>>>>
>>>>>>> >>>. >>> >>>>
>>>> >> >>>>>> >>>> > >>>
>>>>>>.
>>>>> >>>>> (URL TRANSLATION)
>>>> >>>>> >>>> >>>> >> >>>
>>>>> git http-backend >>>>>>>>
>>>>> PATH_INFO >> >>>>>> >>>>>>
>>>> >>>>>>> >>>>>
>>>>>>> > GIT_PROJECT_ROOT >> >>>>
>>>>>> >>>> >> >>>>>>>>
>>>>>>> >>>>> >>>> >> >>
>>>>>> >>>> >>>>>>. >>>
GIT_PROJECT_ROOT >>>>> >>>> >>>>> git
http-backend >>>>> PATH_TRANSLATED >>
>>>>>>>> >> >> >>> >>>>>>
>>>>>> >>>> >>>>>>> >>>>>
>>>>>>.
>>>>>>> (EXAMPLES)
>>>> >>>>>>>> >>>
http://$hostname/git/foo/bar.git >> >> /var/www/git/foo/bar.git
>>>>> >>>>>>>.
Apache 2.x
>>>>>>> >>>> >>>> >> mod_cgi>
mod_alias > mod_env >>>> >>>>>>
GIT_PROJECT_ROOT (>> DocumentRoot) >>
>>>>>>>> >>>>> >>>> > >>
ScriptAlias >> >>> CGI >>>>>
>>>>>>:
SetEnv GIT_PROJECT_ROOT /var/www/git
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
# >>> >>> >> >>>> >>>>>>> >> >>>>> > >>>> >>>>> >> git-http-backend
# >>>>>> >>>>> >>>>> >>>> >>>>>>> >>> >> >> >>>>> >>>>>
# >> >>>> HTTP_GIT_PROTOCOL >>>>> >>>>>> > http-backend >> >> >>
# GIT_PROTOCOL >>> >>>>> >>>. >>> >>>> >>> >> >>> >> >>>> >>>>> >>>>>
# (>> >>> >>>>> >>> >> >>>>>>> >>>>> >>>>>>> >>>>>>>)> >> >>> >>>>>>>>>
# >> >>>>>>>> >>>>>>>> >>> >> >>> >>> >> >>>>> >>>>>>>>> >>>>>>>> >>>>.
#
# >>>>> GIT_PROTOCOL >>>> >>>>>>> >>> >> >>>>>>>> >>>> >>> >>>>>>
# >>>>> >>> (> >> HTTP_GIT_PROTOCOL >>>> >>>>> >>>>> >> >>> >>>> >>
# >>>>>>> >> >> >>>> >>>>>> >>>>> >>>>>>> >>>>>> >>>>>>> >>>).
SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
>>>> >>>> >>>> >>>>>>
>>>>>> >>>>>> >>> >>>>>>
>>>>> >> >>>>> >>>>> >>>>
>> >> >>>> >>>>> >>>>>
>>>>> (>> >> >> >> >>>>
>>>>>>> service >> >>>>
>>>>>>> >> >>>>> >> push
>>>>> >>>>>>>) > >>>
>>>>>>>> receive-pack >> >>>>>
>>>> >>>> >>>:
RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
RewriteCond %{REQUEST_URI} /git-receive-pack$
RewriteRule ^/git/ - [E=AUTHREQUIRED:yes]
Order Deny,Allow
Deny from env=AUTHREQUIRED
AuthType Basic
AuthName "Git Access"
Require group committers
Satisfy Any
...
>>> mod_rewrite >> >>>> >>>>> >>
>>>> >>>>>>> >> >>>>>
>>>>>>> >>>> >>> >>>> >>
>>> git-receive-pack >>>>>> >>>>>
>>>>>:
AuthType Basic
AuthName "Git Access"
Require group committers
...
>> >>> >>>>> >>>> >>
>>>>> >> >>>>>> >>>>>
>>>>> >>>>>> >>> (object negotiation)
>>>>>> push >> >>>> >>>>> >>
>>> >>>> >>>>> >>>>>>>
>>>>> >>>> >>>>>> >>>. >>
>>>> >>>>> >>>> >>>>>
>>>>>>>> http.receivepack >> >> >>
>>>>> >> >>>> >> push >>
>>>>>> >>>> >>>>. >>>>>
>>>>>>> >> >>>>> >>
http.receivepack >>>>> >>>> >>>>>
>> >>>>>> push >>>> >>>>>>>
>>>>> >>>>>>>>> >>>>
>>>>>>>> >>>>>>> >>>>>
>>> >>>> >>>> >>>> >>>>
>>>>> >>>>> >>>> 403 Forbidden >>
>> >>>>>> >>>>> >>>>>
>>>.
>>>> >>>>> >>>>> >>>>
>>>> >> >> >>>>>> >>>>>>
> >>>>>> >> >> >>>>>>>>>>
Location >>>>>>> >>>> >> >>> >>
>>>>>>>>>>>>> >>>> >>
>>>>>>> >>>>:
AuthType Basic
AuthName "Private Git Access"
Require group committers
...
>>>> >>>>> gitweb >> >>>>
>>>>> >>> >> ScriptAliasMatch >>>
>>>> >> >>>>>>>>>> >> git
http-backend >>>>>>>> >>>>>> >>>
>>>>>>> >>>> > >>>> >> >>
gitweb >>>>> >>>>>>:
ScriptAliasMatch \
"(?x)^/git/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
/usr/libexec/git-core/git-http-backend/$1
ScriptAlias /git/ /var/www/cgi-bin/gitweb.cgi/
>>>> >>>>> >>> >>>> >>
>>>>>> >>> >>>>> gitnamespaces(7)
>> >> >>>> >>>>:
SetEnvIf Request_URI "^/git/([^/]*)" GIT_NAMESPACE=$1
ScriptAliasMatch ^/git/[^/]*(.*) /usr/libexec/git-core/git-http-backend/storage.git$1
Apache 2.x >>>>>>>>>> >>>>
>>>>>> >>>>> (Accelerated static Apache 2.x)
>>>>> >>>> >>>>> >>>
>>>>>>> >> >>>>> >>>>
>>>>>>>>>> >>>>>>>>
>>>>>> >>>>>>>>> >> >>>
>>>> >>>>>>> >>>. >>
>>>>>> >> >>>>>>>> >>>
>>> >>>>>>>> >>>>>>>>
>>>> >>>> >>>>> >>>>>>>>
>> >>>> >>>>>>>>>>
>>>>>> >> >>>>>>> >>>> >>
>>>>>>>> >> >>>>>>>>>>
>> >>>> >>> >>>:
SetEnv GIT_PROJECT_ROOT /var/www/git
AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /var/www/git/$1
AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/www/git/$1
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
>>> >>>> >> >>>>>>> >>
>>>>>>>> gitweb >>>>> >>>:
SetEnv GIT_PROJECT_ROOT /var/www/git
AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /var/www/git/$1
AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/www/git/$1
ScriptAliasMatch \
"(?x)^/git/(.*/(HEAD | \
info/refs | \
objects/info/[^/]+ | \
git-(upload|receive)-pack))$" \
/usr/libexec/git-core/git-http-backend/$1
ScriptAlias /git/ /var/www/cgi-bin/gitweb.cgi/
Lighttpd
>>>>>>> >>>> >>>> >>
>>>>>>>>> mod_cgi> mod_alias> mod_auth>
mod_setenv >>>>>>>> >>>>>>>>
>>> GIT_PROJECT_ROOT >> >>>>>>>>
>>>>> >>>> > >>>
>>>>>>>>>> >> >> CGI >>>>>
>>>>:
alias.url += ( "/git" => "/usr/lib/git-core/git-http-backend" )
$HTTP["url"] =~ "^/git" {
cgi.assign = ("" => "")
setenv.add-environment = (
"GIT_PROJECT_ROOT" => "/var/www/git",
"GIT_HTTP_EXPORT_ALL" => ""
)
}
>>>> >>>> >>>> >>>>>>
>>>>>> >>>>>> >>> >>>>>>
>>>>> >> >>>>> >>>>:
$HTTP["querystring"] =~ "service=git-receive-pack" {
include "git-auth.conf"
}
$HTTP["url"] =~ "^/git/.*/git-receive-pack$" {
include "git-auth.conf"
}
>> >> >> git-auth.conf >>>> >>>> >>
>>> >>>:
auth.require = (
"/" => (
"method" => "basic",
"realm" => "Git Access",
"require" => "valid-user"
)
)
# ... > >>>>>>>> auth.backend >> >>>>>
>>>> >>>> >> >>>>> >>>>
>>>> >> >>> >>>>>> >
>>>>>:
$HTTP["url"] =~ "^/git/private" {
include "git-auth.conf"
}
>>>>>>>> >>>>> (ENVIRONMENT)
git http-backend >> >>>>>>>> >>>>> CGI
>>>>>>>>> >>>> >>>>>>>
>>>>>>> >>>> >>>>> >> >>>>:
o PATH_INFO (>>> GIT_PROJECT_ROOT >>>>> >>>
>>>>> >> >>> >>> >>>>
PATH_TRANSLATED)
o REMOTE_USER
o REMOTE_ADDR
o CONTENT_TYPE
o QUERY_STRING
o REQUEST_METHOD
>>>>> >>>>> GIT_HTTP_EXPORT_ALL
>>>>>>>> >> git-http-backend >>>>>
>>> >> >>>>> >>>> >>>>
"git-daemon-export-ok" >> >> >>>> >> >>>
>> >>>>> >>>> >> >>>> (export) >>
>>>> >>>>>> >>>>>.
>>>>> >>>>> GIT_HTTP_MAX_REQUEST_BUFFER (>>
>>>>> >>>>>>>> http.maxRequestBuffer) >>
>>>>>>> >>>> >>>>>
>>>>>>>>> >>>>>>> >>>>>>
>>>>> (ref negotiation) >> >>> >> >>>
>>>>>> (fetch) >>>>>> >>>>>>
>>>>> >>>> >> >>>>>>> >> >>
>>>> >>>>>>>> >>>> >>>>>
>>>> >>>>>> >>>>> >>>. >>>
>>>>> >> >>>> >>>> >>>>> >>
>>>>> >>>>>> >>> >> >>>>>
>> >> >>>>> >> >>>>>
>>>>>>>>>> >>>>> >>
>>>>>>>> >>>>>> >>>>>
>>>>>>> >>>>>>>> >>>>
>>>>. >>> >>>>> >> >>>>>>>
>>>>> >> >> >>>> >>>> >>>
(>> >>>>> >>>>> 100M >>>> >>>
>>>>>>>). >>>>> >>>>>>> >>
>>>>>>> >>>.
>>>>>>>>> >>>> >>> >>
>>>>>>> >> >>> HTTP >> >>>
Git-Protocol >>>>>>>>>> >>>>>>>
>>>>>> (>>>>> >>>>>> v2) >>
>>>>> >>>>. >> >>>>>
>>>>>>>> >> >>>
>>>>>>>>>> >>>>>>> >> >>>
>>>> >> >>>>> >>>>> GIT_PROTOCOL
>>>> >>>. >>>> >>>>>>>>>
>>> >>> >> >> >>>> >>>>>
HTTP_GIT_PROTOCOL >> CGI >>>>> >>>>>>> >
git-http-backend >>>>>> >>>>>> >> >>
>> GIT_PROTOCOL >>> >>>>> >>>. >>
>>> >>>> >>>> >> >>>>>>>>>
>>>> >>> >> >>>>>> >>>>>>>
>> >>>>> >>>>>>>
>>>>>>>>> >>> >>>>> >> >>
>>> >>>> >>>> >>>>>> >>>>
>>>>>>>> >>>> (>> >>> Git-Protocol
>> >>>>>>>> >>>>> >> >>>
>>>>>>> >> >>>> >>>>>>
>>>>).
>>>>>> >>>>>> >>>>>
GIT_COMMITTER_NAME >> >>> $REMOTE_USER >
GIT_COMMITTER_EMAIL >> >>> ${REMOTE_USER}@http.${REMOTE_ADDR}
>>>>> >>>>>>> > >>>> >>>>>
>>>>> >>>>>>>> >> >>>>>>
reflog >>>>>>>> >>>> git-receive-pack
>>>> >>>>>>> >>>>> >>>>>>
>>>>>>> >>>> >> >>>>> (push) >>
>>>>> >>>> >>>.
>>>> >>>>>>>> >>>>> CGI >>>>
>> >> >> >>>>>>> (hooks) >> >>>>
git-receive-pack >>>>>>>> >>>>>>> >>
>>>>> >>>>>.
>>>>>> >>>>>> (SEE ALSO)
git(1), git-daemon(1), githooks(5), gitnamespaces(7)
>>> (GIT)
>>>> >> >>>>>> git(1)
Git 2.55.0 2026-06-29 GIT-HTTP-BACKEND(1)