Git on Jenkins master doesn't work because $HOME is not set

git fails with fatal: $HOME not set

By Takeshi Kanemoto
On Dec. 31, 2011, 5:29 p.m.

After trying to figure out what was going on, the response to a simple sanity check command said it all:

+ git config --list --global
fatal: $HOME not set
More details filed here: In my case the debian package was slightly newer (the one that came with Ubuntu 11.10), and jenkins is now controlled using service, and i modified the /etc/init/jenkins file to include
env HOME="/var/lib/jenkins"
with the rest of the environment variables.

About the author

Takeshi Kanemoto

I'm a software engineer based in Cambridge, UK.