List for cgit developers and users
 help / color / mirror / Atom feed
* [Idea] A local cgit configuration per project?
@ 2015-04-30 12:57 
  2015-04-30 13:06 ` john
  0 siblings, 1 reply; 3+ messages in thread
From:  @ 2015-04-30 12:57 UTC (permalink / raw)


Hi, cgit mailing-list!

As a newbie to cgit, I'm currently trying to configure it for a a
project which hosts some git repos.
It seems to me (please refute me if I'm wrong) that cgit takes its
configuration from a given hard-coded path, i.e. "/etc/cgitrc".
This mean that basically there should only be one instance of cgit per system.

I wonder if it is feasible that cgit would take its *main*
configuration from "/etc/cgitrc",
but also would override it from a *local* one, e.g. a given
configuration from a project
(typically per Apache virtual host)?

Perhaps this could be "easily" achieved either by wrapping cgit CGI in
an other dedicated script,
setting a project's environment, or by cgit searching for additional
config. pointed by an environment variable, or else through argument
on command-line?

If this is already achievable, could you please point me to some
related documentation?
Otherwise, what do you think about this idea?

-- Vincent F?rotin


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Idea] A local cgit configuration per project?
  2015-04-30 12:57 [Idea] A local cgit configuration per project? 
@ 2015-04-30 13:06 ` john
  2015-04-30 13:11   ` 
  0 siblings, 1 reply; 3+ messages in thread
From: john @ 2015-04-30 13:06 UTC (permalink / raw)


On Thu, Apr 30, 2015 at 02:57:22PM +0200, Vincent F?rotin wrote:
> As a newbie to cgit, I'm currently trying to configure it for a a
> project which hosts some git repos.
> It seems to me (please refute me if I'm wrong) that cgit takes its
> configuration from a given hard-coded path, i.e. "/etc/cgitrc".
> This mean that basically there should only be one instance of cgit per system.
> 
> I wonder if it is feasible that cgit would take its *main*
> configuration from "/etc/cgitrc",
> but also would override it from a *local* one, e.g. a given
> configuration from a project
> (typically per Apache virtual host)?
> 
> Perhaps this could be "easily" achieved either by wrapping cgit CGI in
> an other dedicated script,
> setting a project's environment, or by cgit searching for additional
> config. pointed by an environment variable, or else through argument
> on command-line?
> 
> If this is already achievable, could you please point me to some
> related documentation?

You can set CGIT_CONFIG in the environment to override the location of
the config file.

Alternatively you can use environment variables to select a per-project
file to include with the "include" directive via macro expansion.  This
is documented in cgitrc(5) (search for "include=").


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Idea] A local cgit configuration per project?
  2015-04-30 13:06 ` john
@ 2015-04-30 13:11   ` 
  0 siblings, 0 replies; 3+ messages in thread
From:  @ 2015-04-30 13:11 UTC (permalink / raw)


Oh, great! Thank you for the quick and accurate help :-)
Sorry for the noise...

Thanks again,

-- Vincent F?rotin

2015-04-30 15:06 GMT+02:00 John Keeping <john at keeping.me.uk>:
> On Thu, Apr 30, 2015 at 02:57:22PM +0200, Vincent F?rotin wrote:
>> As a newbie to cgit, I'm currently trying to configure it for a a
>> project which hosts some git repos.
>> It seems to me (please refute me if I'm wrong) that cgit takes its
>> configuration from a given hard-coded path, i.e. "/etc/cgitrc".
>> This mean that basically there should only be one instance of cgit per system.
>>
>> I wonder if it is feasible that cgit would take its *main*
>> configuration from "/etc/cgitrc",
>> but also would override it from a *local* one, e.g. a given
>> configuration from a project
>> (typically per Apache virtual host)?
>>
>> Perhaps this could be "easily" achieved either by wrapping cgit CGI in
>> an other dedicated script,
>> setting a project's environment, or by cgit searching for additional
>> config. pointed by an environment variable, or else through argument
>> on command-line?
>>
>> If this is already achievable, could you please point me to some
>> related documentation?
>
> You can set CGIT_CONFIG in the environment to override the location of
> the config file.
>
> Alternatively you can use environment variables to select a per-project
> file to include with the "include" directive via macro expansion.  This
> is documented in cgitrc(5) (search for "include=").


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-30 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-30 12:57 [Idea] A local cgit configuration per project? 
2015-04-30 13:06 ` john
2015-04-30 13:11   ` 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).