如何将服务器端挂钩添加到GitLab?

问题描述 投票:1回答:1

如果有人在推送其他提交之前,我想阻止在GitLab上执行推送。我会强迫他先拉,然后进行互动式变基。我以为我需要服务器端git钩子。

我的免费文章:https://docs.gitlab.com/ce/administration/server_hooks.html

但是我停留在这行:On the GitLab server, navigate to the project’s repository directory.

我如何登录到GitLab?我安装了gitlab-runner,但不知道如何“登录”并将预接收脚本添加到hooks子目录中。

你有什么想法吗?

git gitlab githooks
1个回答
0
投票

Protecting the branch应该足够:这样可以防止将力推入分支。而且可以通过GitLab GUI进行设置,而不必登录到GitLab服务器。

这意味着:如果有人已经推动过,则必须先拉动,然后才能推动自己。

© www.soinside.com 2019 - 2024. All rights reserved.