我使用此配置制作了git HTTP服务器。 Git它拉动完美,但推送我403 HTTP错误。我不知道如何解决这个错误,但我真的想要没有SSH的git服务器。
virtualhost配置
<VirtualHost *:%httpport%>
DocumentRoot "%pathToVRoot%/repos/"
ServerName git.domain.tld
UseCanonicalName Off
SetEnv GIT_PROJECT_ROOT %pathToVRoot%/repos/
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ %sprogdir%/git/git-core/git-http-backend.exe/
RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
RewriteCond %{REQUEST_URI} /git-receive-pack$
RewriteRule ^/git/ - [E=AUTHREQUIRED:yes]
<Directory "/">
Options All +Indexes
</Directory>
<Directory "%sprogdir%/git/git-core*">
Options ExecCGI Indexes
Order allow,deny
Allow from all
Require all granted
</Directory>
<LocationMatch "^/git/">
Order Deny,Allow
Deny from env=AUTHREQUIRED
AuthType Basic
AuthName "Git Access"
AuthUserFile %sitedir%/git/users.cfg
AuthGroupFile %sitedir%/git/groups.cfg
Require group admin
Satisfy Any
</LocationMatch>
<LocationMatch "^/git/.*/git-receive-pack$">
Options +ExecCGI
Require all granted
</LocationMatch>
<LocationMatch "^/git/.*/git-upload-pack$">
Options +ExecCGI
Require all granted
</LocationMatch>
</VirtualHost>
此处请求信息失败
致命:无法访问 'http://username@git.domain.tld/git/someRepo/':请求的网址 返回错误:403推送到 http://username@git.domain.tld/git/someRepo/