List for cgit developers and users
 help / color / mirror / Atom feed
* cgit simple-authentication.lua problem
@ 2023-06-15  7:40 Yazar Strulik
  2023-06-15 18:57 ` John Keeping
  0 siblings, 1 reply; 2+ messages in thread
From: Yazar Strulik @ 2023-06-15  7:40 UTC (permalink / raw)
  To: cgit

Hi cgit-people,

I need some help with getting the simple-authentication.lua running.

I'm using gitolite as my git base with cgit as my front-end and apache2 
as the webserver.
The main cgit configuration works but it cant interpret the .lua files 
when using the authentication-filters by adding following line to the 
cgitrc:
```
auth-filter=/usr/lib/cgit/filters/simple-authentication.lua
```
The error I get from apache2 error.log is:
```
AH01215: /usr/lib/cgit/filters/simple-authentication.lua: 1: : 
/usr/lib/cgit/cgit.cgi
AH01215: --: not found: /usr/lib/cgit/cgit.cgi
AH01215: : /usr/lib/cgit/cgit.cgi
AH01215: /usr/lib/cgit/filters/simple-authentication.lua: 2: --: not 
found: /usr/lib/cgit/cgit.cgi
AH01215: /usr/lib/cgit/filters/simple-authentication.lua: 3: --: not 
found: /usr/lib/cgit/cgit.cgi
AH01215: /usr/lib/cgit/filters/simple-authentication.lua: 4: --: not 
found: /usr/lib/cgit/cgit.cgi
AH01215: /usr/lib/cgit/filters/simple-authentication.lua: 6: Syntax 
error: newline unexpected: /usr/lib/cgit/cgit.cgi
```
Which seems from "--: not found" as if he is trying to execute the lua 
comments at the start of simple-authentication.lua.

I enabled the cgi and lua mods for apache (with a2enmod) and apt 
installed luajit, lua-posix and luaossl.

I'm not really sure how to fix this problem but maybe someone of you 
knows how to fix it, since problems on that are rare on the internet.


Greetings,
Yaz


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

* Re: cgit simple-authentication.lua problem
  2023-06-15  7:40 cgit simple-authentication.lua problem Yazar Strulik
@ 2023-06-15 18:57 ` John Keeping
  0 siblings, 0 replies; 2+ messages in thread
From: John Keeping @ 2023-06-15 18:57 UTC (permalink / raw)
  To: Yazar Strulik; +Cc: cgit

On Thu, Jun 15, 2023 at 09:40:35AM +0200, Yazar Strulik wrote:
> I need some help with getting the simple-authentication.lua running.
> 
> I'm using gitolite as my git base with cgit as my front-end and apache2 as
> the webserver.
> The main cgit configuration works but it cant interpret the .lua files when
> using the authentication-filters by adding following line to the cgitrc:
>
> auth-filter=/usr/lib/cgit/filters/simple-authentication.lua

The path needs a "lua:" prefix, like this:

	auth-filter=lua:/usr/lib/cgit/filters/simple-authentication.lua

Without that the default "exec:" path is used which tries to execute the
script.

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

end of thread, other threads:[~2023-06-15 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15  7:40 cgit simple-authentication.lua problem Yazar Strulik
2023-06-15 18:57 ` John Keeping

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).