0

I'm trying to setup custom git hooks with gitlab similar to the user in this question. Specifically a pre-receive hook - therefore web hooks and CI will not suffice.

Most search results show how to perform this action when admin access to the gitlab host file system is available. This mirrors the documentation:

Custom Git hooks must be configured on the filesystem of the GitLab server. Only GitLab server administrators will be able to complete these tasks.

However, the following is later mentioned:

As of gitlab-shell version 2.2.0 (which requires GitLab 7.5+), GitLab administrators can add custom git hooks to any GitLab project.

I'd like to make sure I understand this correctly, does this line mean one can add custom git hooks with gitlab-shell alone - in other words - without file system access?

If so let's assume the following for a gitlab user:

  • the user does not have an account (admin or otherwise) on the operating system where the gitlab software is installed (can't access relevant portions of the filesystem)
  • the user does have an account to login to the gitlab system software itself, and this account is assigned gitlab admin level privileges

Will this user be able to add custom git hooks to any gitlab project? If so, how is this achieved?

dtmland
  • 2,136
  • 4
  • 22
  • 45
  • See the first line of the documentation page you linked: "Please explore webhooks and CI as an option if you do not have filesystem access. " – MrTux Nov 14 '18 at 15:13
  • Right, this is the line I've partially quoted above - the conclusion being that adding custom git hooks using gitlab-shell simply isn't possible? If this is the case I think it is confusing that the blurb about gitlab-shell and custom git hooks (my second quote above) is there in the first place. It should be re-worded in my opinion. Thanks! @MrTux – dtmland Nov 14 '18 at 15:23

0 Answers0