drwahl / puppet-git-hooks

Git client and server side hooks for puppet development
GNU General Public License v2.0
218 stars 122 forks source link

Silly question - server side hook, puppet run #99

Open williamayerst opened 7 years ago

williamayerst commented 7 years ago

Hi there!

I'm looking to utilise this repo and just running into a bit of a confusion around how I get the server-side custom hooks working. I was wondering if someone might be able to shed some light on the situation?

There was some finangling required to get things running with Puppet 4.x and on Ubuntu 16.04 but all appears to be fine.

The final hurdle seems to be that the pre-recieve git hook is attempting to create a default .puppetlabs file, but it's creating it under /var/opt/gitlab and this is failing because it doesn't have the permissions to do so. I am wary about giving the git user full rights over this folder (since apparently that's not intended).

The hook is running as the 'git' user, whose home directory I have changed/set to /home/git, but that hasn't made any difference.

Any thoughts?

williamayerst commented 7 years ago

(FWIW creating a folder called ".puppetlabs" in /var/opt/gitlab and chowning to git makes this work.)