ubuntu - 远程 : hooks/update:11: undefined method `require_relative' for main:Object (NoMethodError)

标签 ubuntu git gitlab

我试图从我的 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 '***************************'

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

最佳答案

.git/hooks/update在您的存储库中:您有一个 update对将要接收的文件进行检查的钩子(Hook)。在这种情况下,它运行了检查,并阻止了更新(或者它自己崩溃了;我真的不知道)。一个 update hook 必须退出 0 才能允许更新。见official git book中的相关章节,以及 reference manual更多细节。

关于ubuntu - 远程 : hooks/update:11: undefined method `require_relative' for main:Object (NoMethodError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30529905/

相关文章:

linux - “cat”和“gedit”显示不同的/proc/cpuinfo

git - 在外部磁盘上备份整个 git 存储库的最佳方法是什么?

GitLab API 未列出容器注册表中的所有图像存储库

c++ - constexpr 适用于 Ubuntu,但不适用于 MacOS

ruby-on-rails - 我在 Ubuntu 8.04.4 机器上安装 RVM 失败。我应该将它安装为多用户吗?

laravel - 公共(public)文件夹不适用于 Mix 和 Asset Laravel Helpers Ubuntu 21.04

eclipse - Windows/Linux 上是否有任何 IDE/GUI 支持 git-flow?

git - 有时 git 会在我不要求的情况下将所有远程 git 分支作为本地分支进行跟踪。发生了什么?

git - 如何从 gitlab 项目中获取 GH_TOKEN

git - 如何为两个 GitLab 帐户设置两个 SSH key 并使用 TortoiseGit 进行推送/pull ?