惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
U
Unit 42
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
G
Google Developers Blog
Recent Announcements
Recent Announcements
B
Blog RSS Feed
罗磊的独立博客
博客园 - Franky
J
Java Code Geeks
S
SegmentFault 最新的问题
D
DataBreaches.Net
C
Check Point Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
腾讯CDC
博客园_首页
美团技术团队
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏

博客园 - Questions张

每次打开webstorm需要重新source才能找到node,Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.74.dylib vscode 的md文件,如何设置默认用Markdown插件打开 如何清理各种Linux系统的磁盘空间以及日志文件大文件等 如何科学的通过学习词根词缀快速扩大自己的词汇量 微信如何开通wx.getPhoneNumber权限 淘宝NPM镜像地址https://registry.npm.taobao.org不可用 iPhone上使用VLC app导入本地英语听力文件(支持定时关闭sleep timer功能) idea打开properties文件中文乱码问题 如何系统的学习AI相关的知识,进入到AI行业-grok的答案 MacOs解决rz waiting to receive.**B0100000023be50 iterm的rz命令只能选择文件夹不能选择文件的问题 iTerm2 中使用 `rz` 命令无法弹出文件选择窗口,以及正确配置 CentOs8中vi以及vim编辑中文乱码问题 Centos8的镜像仓库停服无法连接切换国内镜像源 curl: (7) Failed to connect to 127.0.0.1 port 1087 after 6 ms: Couldn't connect to server 白嫖claude code的100美元额度,anyrouter中转服务 MacOs下todesk网络连接错误,无法登录 MacOs如何解决brew update卡住问题 Docker国内镜像加速配置 request to https://registry.npm.taobao.org/cyarn failed, reason: certificate has expired
git push报错remote: hooks/pre-receive:14:in require_relat...
Questions张 · 2025-04-23 · via 博客园 - Questions张

1 详细错误信息

remote: hooks/pre-receive:14:in require_relative': cannot load such file -- /var/opt/gitlab/git-data/repositories/talkilla/talkilla.git/lib/gitlab_custom_hook (LoadError)
remote:         from hooks/pre-receive:14:in <main>'
To new.gitlab.jiushiyaokuaile.cn:talkilla/talkilla.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'new.gitlab.jiushiyaokuaile.cn:talkilla/talkilla.git' 

2 原因  gitlab_custom_hook.rb文件找不到

3 解决方案,修改pre-receive文件,把gitlab_custom_hook的具体路径写对

find / -name 'gitlab_custom_hook.rb' 搜索全局找到正确的路径,写死完整路径就可以了。相对路径可能因为系统的变化导致找不到对应的路径,也可能是丢失了软连接等问题。