remote:hooks / update:11:未定义的方法`require_relative'for main:Object(NoMethodError)

问题描述 投票:0回答:2

我试图从我的Ubuntu机器上向Gitlab提交一些东西,我得到以下错误。

user@user-laptop:$ git push
Username for '*************': *********
Password for '************************': 
Counting objects: 69, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (59/59), done.
Writing objects: 100% (69/69), 21.45 KiB | 0 bytes/s, done.
Total 69 (delta 48), reused 2 (delta 2)
remote: hooks/update:11: undefined method `require_relative' for main:Object (NoMethodError)
remote: error: hook declined to update refs/heads/android_lollipop_testing
To ***********************************
! [remote rejected] android_lollipop_testing -> android_lollipop_testing (hook declined)
error: failed to push some refs to '***************************'

有人可以解释一下为什么会这样吗?我需要做什么 ?

ubuntu git gitlab
2个回答
1
投票

查看存储库中的.git/hooks/update:您有一个update挂钩,可以对要接收的文件运行检查。在这种情况下,它运行检查,并阻止更新(或它崩溃自己;我无法真正告诉)。 update钩子必须退出0才能进行更新。有关更多详细信息,请参阅official git book中的相关章节和reference manual


0
投票

有时使用HTTP克隆只允许PULL但限制PUSH。可以通过SSH再次克隆,和

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