Looking for tips on deploying a custom pre-receive hook ENV in GitHub Enterprise

I want to execute a python-based pre-receive hook in our GitHub Enterprise installation.

I uploaded a CentOS7 Docker image and a CentOS7 chroot ENV, and neither work. Both produce the same error when the hook is accessed during the push:

remote: hooks/script: failed with exit status 1
remote: execvp: No such file or directory

I assume this is the result of a fundamental config issue on the GitHub Enterprise server since both images work correctly outside of GitHub, e.g., I can run that python script in either ENV outside of GitHub.

Are there additional permissions, etc. required on the GitHub Enterprise server in order to allow a custom pre-receive hook ENV to function properly?

Thanks in advance!

Hi @mgoddard27,

Thank you for being here! Is Bash added to the container? Bash is a prerequisite for the pre-receive hook to function correctly. If is not included, you will need to add it and re-build the container.

Apologies for the delay in following-up … thank you for responding. Yes, bash is in the container. I’m able to work, compile, run git cmds, etc. inside that particular Docker container, so I know aside from the error I mentioned, it works correctly.