Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitolite not seeing HOME environment variable. #1

Open
TheGreatMcPain opened this issue Apr 14, 2022 · 0 comments
Open

gitolite not seeing HOME environment variable. #1

TheGreatMcPain opened this issue Apr 14, 2022 · 0 comments

Comments

@TheGreatMcPain
Copy link

FYI I'm using my fork of this project which merges the changes with cgit version 1.2.3.

Using the default gitolite-authorization.lua script gitolite complains that the HOME variable is not initialized.

This happens both calling the cgit binary directly like so...

$ HOME=/var/lib/gitolite /path/to/cgit.cgi 1>cgit.html 2>cgit.log

and via nginx where I set the HOME environment variable via fastcgi_param.

I was able to make it work by modifying the io.popen call from

local handle = io.popen("gitolite list-phy-repos | gitolite access % " .. git.user .. " R any")

to

local handle = io.popen("env HOME=/var/lib/gitolite gitolite list-phy-repos | env HOME=/var/lib/gitolite gitolite access % " .. git.user .. " R any")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant