cgit simple-authentication.lua problem

Yazar Strulik yazar.strulik at googlemail.com
Thu Jun 15 07:40:35 UTC 2023


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



More information about the CGit mailing list