Gitolite and Gitlab – How the `www-data` user can checkout

gitgitolite

I have just installed Gitolite and Gitlab and I am very happy with it. Everything works fine so far.
I can create repos, push to them, clone them on other clients on the network. Great!

But now I wanted to do some post-receive hooks.
I.e. when I push to some repo, this repo should be checked out on the server in the /var/www/repos directory.

I did this with Gitlabs Deploy Hooks and this Endpoint-Script.

The problem is that the scripts are run under the user "www-data" which has no access to gitlab/gitolite.

How do I change this?
I need to be able to checkout repos with www-data user and using git@server/repo.git syntax.

Best Answer

You don't need to use ssh for his. If you add the www-data user to the gitolite group your webserver should be able to read the repositories from the filesystem.