From: "J.H." <warthog19@eaglescrag.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: "Russell King - ARM Linux" <linux@arm.linux.org.uk>,
"Detlef Vollmann" <dv@vollmann.ch>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Jello huang" <ruifeihuang@gmail.com>,
git@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: cannot fetch arm git tree
Date: Sun, 23 Jan 2011 23:34:28 -0800 [thread overview]
Message-ID: <4D3D2B84.6090409@eaglescrag.net> (raw)
In-Reply-To: <4D3D2865.4020408@viscovery.net>
On 01/23/2011 11:21 PM, Johannes Sixt wrote:
> Am 1/21/2011 15:50, schrieb Russell King - ARM Linux:
>> SetEnv GIT_PROJECT_ROOT /var/www/git
>> SetEnv GIT_HTTP_EXPORT_ALL
>> ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
>>
>> Great. Deciding that it will be http://servername.example.com/git/ is
>> really damned annoying as that's traditionally where gitweb lives,
>> which requires a different script alias.
>> ...
>> I'm really not interested in working out how to bodge this into working
>> along side the existing gitweb setup by adding lots of rewrite rules,...
>
> It has been worked out for you already. It's just a single rule (although
> a bit longish). Look for 'ScriptAliasMatch' in
> http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html
I was going to say, I have both gitweb and smart http support running in
parallel, it's not terribly complicated. The way I'm doing it is a bit
older (mainly that long ScriptAliasMatch broken out more), but it's
still only 11 lines to the apache config:
# Various environment setup, should be obvious
SetEnv GIT_PROJECT_ROOT /path
SetEnv GIT_HTTP_EXPORT_ALL 1
SetEnv GIT_EXEC_PATH /usr/libexec/git-core/
# Here so that we can do straight wget fetches for the objects files,
# pack files and refs heads.
# This isn't strictly neccisary, but if it's done we can use the inbuilt
# sendfile() of apache for the sending of those files vs. funneling them
# through the CGI
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /path/$1
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /path/$1
AliasMatch ^/(.*/refs/heads/.*)$ /path/$1
# Meat of how to make this all work
ScriptAliasMatch "^/(.*/HEAD)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/(.*/info/refs)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/(.*/objects/info/[^/]+)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/pub/scm/(.*/git-upload-pack)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/pub/scm/(.*/git-receive-pack)$"
/usr/libexec/git-core/git-http-backend/path/$1
Just an example anyway, the paths have been shortened to fit e-mail better.
- John 'Warthog9' Hawley
WARNING: multiple messages have this Message-ID (diff)
From: warthog19@eaglescrag.net (J.H.)
To: linux-arm-kernel@lists.infradead.org
Subject: cannot fetch arm git tree
Date: Sun, 23 Jan 2011 23:34:28 -0800 [thread overview]
Message-ID: <4D3D2B84.6090409@eaglescrag.net> (raw)
In-Reply-To: <4D3D2865.4020408@viscovery.net>
On 01/23/2011 11:21 PM, Johannes Sixt wrote:
> Am 1/21/2011 15:50, schrieb Russell King - ARM Linux:
>> SetEnv GIT_PROJECT_ROOT /var/www/git
>> SetEnv GIT_HTTP_EXPORT_ALL
>> ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
>>
>> Great. Deciding that it will be http://servername.example.com/git/ is
>> really damned annoying as that's traditionally where gitweb lives,
>> which requires a different script alias.
>> ...
>> I'm really not interested in working out how to bodge this into working
>> along side the existing gitweb setup by adding lots of rewrite rules,...
>
> It has been worked out for you already. It's just a single rule (although
> a bit longish). Look for 'ScriptAliasMatch' in
> http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html
I was going to say, I have both gitweb and smart http support running in
parallel, it's not terribly complicated. The way I'm doing it is a bit
older (mainly that long ScriptAliasMatch broken out more), but it's
still only 11 lines to the apache config:
# Various environment setup, should be obvious
SetEnv GIT_PROJECT_ROOT /path
SetEnv GIT_HTTP_EXPORT_ALL 1
SetEnv GIT_EXEC_PATH /usr/libexec/git-core/
# Here so that we can do straight wget fetches for the objects files,
# pack files and refs heads.
# This isn't strictly neccisary, but if it's done we can use the inbuilt
# sendfile() of apache for the sending of those files vs. funneling them
# through the CGI
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /path/$1
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /path/$1
AliasMatch ^/(.*/refs/heads/.*)$ /path/$1
# Meat of how to make this all work
ScriptAliasMatch "^/(.*/HEAD)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/(.*/info/refs)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/(.*/objects/info/[^/]+)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/pub/scm/(.*/git-upload-pack)$"
/usr/libexec/git-core/git-http-backend/path/$1
ScriptAliasMatch "^/pub/scm/(.*/git-receive-pack)$"
/usr/libexec/git-core/git-http-backend/path/$1
Just an example anyway, the paths have been shortened to fit e-mail better.
- John 'Warthog9' Hawley
next prev parent reply other threads:[~2011-01-24 7:35 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 2:28 cannot fetch arm git tree Jello huang
2011-01-16 9:23 ` Russell King - ARM Linux
2011-01-16 11:08 ` Uwe Kleine-König
2011-01-16 11:08 ` Uwe Kleine-König
[not found] ` <AANLkTinrZ0GnT71GCueUUpAXM5ckq+LBd0RjA51DMR-a@mail.gmail.com>
2011-01-16 13:42 ` Russell King - ARM Linux
2011-01-16 13:42 ` Russell King - ARM Linux
2011-01-17 1:49 ` Jello huang
2011-01-17 1:49 ` Jello huang
2011-01-21 13:38 ` Detlef Vollmann
2011-01-21 13:38 ` Detlef Vollmann
2011-01-21 13:47 ` Uwe Kleine-König
2011-01-21 13:47 ` Uwe Kleine-König
2011-01-21 13:57 ` Russell King - ARM Linux
2011-01-21 13:57 ` Russell King - ARM Linux
2011-01-21 14:28 ` Detlef Vollmann
2011-01-21 14:28 ` Detlef Vollmann
2011-01-21 14:30 ` Jello huang
2011-01-21 14:30 ` Jello huang
2011-01-21 14:50 ` Russell King - ARM Linux
2011-01-21 14:50 ` Russell King - ARM Linux
2011-01-21 15:14 ` Detlef Vollmann
2011-01-21 15:14 ` Detlef Vollmann
2011-01-21 15:25 ` Uwe Kleine-König
2011-01-21 15:25 ` Uwe Kleine-König
2011-01-24 5:01 ` Miles Bader
2011-01-24 5:01 ` Miles Bader
2011-01-24 7:21 ` Johannes Sixt
2011-01-24 7:21 ` Johannes Sixt
2011-01-24 7:34 ` J.H. [this message]
2011-01-24 7:34 ` J.H.
2011-01-24 10:53 ` Russell King - ARM Linux
2011-01-24 10:53 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D3D2B84.6090409@eaglescrag.net \
--to=warthog19@eaglescrag.net \
--cc=dv@vollmann.ch \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=ruifeihuang@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.