List for cgit developers and users
 help / color / mirror / Atom feed
* Private repos & auth
@ 2019-06-13 21:20 dev
  2019-06-20 21:08 ` dev
  0 siblings, 1 reply; 2+ messages in thread
From: dev @ 2019-06-13 21:20 UTC (permalink / raw)


Great questions by Paul! I am facing exactly the same use case and these
questions are not yet answered:

> # Private repos
> I have my config set to "scan". Would it be possible to declare 
> somewhere in the repo *itself* that it should be private?
> 
> # Authentication
> I see the filter documentation but I am unsure how to actually implement 
> it. I'd like *some* public repos but most of my repos are private.

I have recently installed Gitolite and cgit, after the usual
installation and configuration ups and downs, everything works fine now
(using SSH for cloning). But since yesterday I am struggling to
implement authentication for a subset of repos (call them private). My
first idea was to use HTTP basic auth, without success. Then I
investigated into the cgit filter and example script
'simple-authentication.lua'. I configured the variables in this script
but have no clue how to correctly trigger and deploy it. How and where
do I correctly provide the 12 arguments as mentioned in cgitrc? A
working setup using the script and proper configuration in cgitrc would
help me a lot.

There is another very interesting approach for auth using the already
provided setup from Gitolite
(https://stackoverflow.com/a/17783132/4905542). However, I could not
find the required Perl packages and put this on hold.

So, what is the best practice for using private repositories beside
public one in cgit? Any help is welcome!

Thank you.
?Martin


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

* Private repos & auth
  2019-06-13 21:20 Private repos & auth dev
@ 2019-06-20 21:08 ` dev
  0 siblings, 0 replies; 2+ messages in thread
From: dev @ 2019-06-20 21:08 UTC (permalink / raw)


> So, what is the best practice for using private repositories beside
> public one in cgit? Any help is welcome!

After some more tinkering and going back to HTTP Basic Auth, I figured
out a robust and, IMHO, elegant way to solve my requirements. It may not
be the right approach for all because it relies on features of the h2o
web server. But since I recently switched to it anyhow, it fully
integrates in my personal setup (btw, h2o is a fresh breeze after years
of Apache configuration struggling and its performance is outstanding -
you might want to give it a try)

https://github.com/h2o/h2o/wiki/Hosting-private-and-public-repositories-with-cgit-and-Gitolite



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

end of thread, other threads:[~2019-06-20 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 21:20 Private repos & auth dev
2019-06-20 21:08 ` dev

List for cgit developers and users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/cgit

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 cgit cgit/ http://inbox.vuxu.org/cgit \
		cgit@lists.zx2c4.com
	public-inbox-index cgit

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.cgit


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git