My git server is running on Gitolite under the git system user. I added the git user to ~ / .profile: export STAGE_PATH="/srv/http/stage"as you can guess, I want to automatically place the website from the repo at the stage when the changes are clicked. However, it seems that the STAGE_PATH variable is not available to me in the post-receive hook. This is normal? Is there a way to access environment variables from behind a hook after receiving?
export STAGE_PATH="/srv/http/stage"
How about adding, ~ git /. The profile at the top of your post-receive hook script (suppose sh).
It is not clear what exactly you want. Do you want to:
1) . , ? script?
2) , , , , - . , , , . .profile . , git , script. , , ( .profile).
git git , export ed . , .
git
export
, for line in $(printenv); do echo $line; done) . , .
for line in $(printenv); do echo $line; done