Skip to content

gitolite not seeing HOME environment variable. #1

@TheGreatMcPain

Description

@TheGreatMcPain

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions