How to use gitlab-shell to “add custom git hooks to any GitLab project”

六眼飞鱼酱① 提交于 2020-01-16 20:09:47

问题


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?

来源:https://stackoverflow.com/questions/53288620/how-to-use-gitlab-shell-to-add-custom-git-hooks-to-any-gitlab-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!