Serve repos via git+https outside of cgit

* modules/cgit/templates/git.vhost.erb: Add Apache aliases to the
git-http-backend CGI and static git files where possible. This makes
git clone, pull and fetch HTTPS URLs more consistent with their git
protocol counterparts.

* modules/openstack_project/files/git/cgitrc: Adjust the displayed
HTTPS clone URL in the WebUI to match.

Change-Id: Ibb4fd41191f33b615ed36f78e1951555a1c0dad1
This commit is contained in:
Jeremy Stanley 2013-08-15 01:29:03 +00:00
parent 402057c996
commit ef54ed93c9
2 changed files with 8 additions and 1 deletions

View File

@ -21,6 +21,13 @@
RewriteEngine On
RewriteRule ^/$ /cgit [R]
SetEnv GIT_PROJECT_ROOT /var/lib/git/
SetEnv GIT_HTTP_EXPORT_ALL
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /var/lib/git/$1
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/lib/git/$1
ScriptAlias / /usr/libexec/git-core/git-http-backend/
ErrorLog /var/log/httpd/git-error.log
LogLevel warn

View File

@ -6,7 +6,7 @@
cache-size=0
# Specify some default clone prefixes
clone-prefix=git://git.openstack.org https://git.openstack.org/cgit
clone-prefix=git://git.openstack.org https://git.openstack.org
# Specify the css url
css=/cgit-data/cgit.css