【问题标题】:Gitolite bug when pushing to server推送到服务器时出现 Gitolite 错误
【发布时间】:2013-05-29 17:50:37
【问题描述】:

我有一个带有 Git 和 Gitolite 的 Linux 服务器。到现在为止,总是工作正常,但从昨天开始我遇到了问题。我可以连接并拉取我的存储库,但是当我推送时,我会遇到这些类型的错误:

remote: Empty compile time value given to use lib at hooks/update line 6
remote: Use of uninitialized value in require at hooks/update line 7.
remote: Can't locate Gitolite/Hooks/Update.pm in @INC (@INC contains:  /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at hooks/update line 7.
remote: BEGIN failed--compilation aborted at hooks/update line 7.
remote: error: hook declined to update refs/heads/master
To git@myhost.com:/home/git/repositories/gitolite-admin.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@myhost.com:/home/git/repositories/gitolite-admin.git'

我迷路了……你能帮帮我吗?谢谢

【问题讨论】:

    标签: linux git gitolite


    【解决方案1】:

    Empty compile time value”是绕过 gitolite 的典型 url。

    你用过:

    git@myhost.com:/home/git/repositories/gitolite-admin.git
    

    但你应该使用过:

    git@myhost.com:gitolite-admin
    

    请参阅“git, gitolite error push”了解更多信息。

    【讨论】:

    • 是的,但是当我使用 git@myhost.com:gitolite-admin 时出现错误。 Git 说存储库 gitolite-admin 不存在...
    • @Bob 这意味着您的安装未正确完成:ssh git@myhost.com 应该返回一条 gitolite 消息。重新安装,确保gitolite 脚本位于PATH 中,正如您在myhost.com 上的sshd 所公开的那样。
    【解决方案2】:

    问题可能在于使用 repo 的“http uri”克隆存储库。如果是这样,以下解决方案可能会解决问题。

    编辑项目根目录中的.git/config。 寻找远程源部分。

    [remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = http://myhost.com/home/git/repositories/gitolite-admin.git
    

    然后将配置文件中的url字段替换为ssh url git@myhost.com:/home/git/repositories/gitolite-admin.git

    然后尝试推动。

    【讨论】:

      猜你喜欢
      • 2011-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-11
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 2012-12-23
      相关资源
      最近更新 更多