首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >设置全局git预接收.d钩子

设置全局git预接收.d钩子
EN

Stack Overflow用户
提问于 2019-09-24 09:42:42
回答 1查看 45关注 0票数 0

在gitlab服务器上,我在(/etc/gitlab/custom_hooks_dir/pre-receive.d/extension_autorisation)中创建了一个全局自定义钩子(/etc/gitlab/custom_hooks_dir/pre-receive.d/extension_autorisation),它是用#!/bin/env 编写的。

我在(/etc/gitlab/gitlab.rb).中的"gitlab.rb“文件中添加了一行((/etc/gitlab/gitlab.rb).= '/etc/gitlab/custom_hooks_dir/pre-receive.d/extension_autorisation') )

然后运行sudo重新配置

但是,当我推入存储库时,什么都不会发生!

我已经通过将它直接放在存储库中进行了测试,并且它可以工作。图片:试验推送

并且自定义钩子由git end可执行文件拥有:

9月17日,drwxr-xr-x3 git 4096。17:20 custom_hooks_dir

9月17日,drwxr-xr-x2git 409617:20接收前d

-rwxr-xr-x1git 3622 9月17日16:56 extension_autorisation

有什么帮助吗?

提前谢谢。

你好,罗伯特

EN

回答 1

Stack Overflow用户

发布于 2019-09-24 14:46:31

我在配置中发现了问题。线路。

它必须是(gitlab_shell'custom_hooks_dir‘= '/etc/gitlab/custom_hooks_dir/')

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58077426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档