3

我有一个带有 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'

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

4

2 回答 2

1

空编译时间值”是绕过 gitolite 的典型 url。

你用过:

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

但你应该使用过:

git@myhost.com:gitolite-admin

有关更多信息,请参阅“ git,gitolite 错误推送”。

于 2013-05-29T19:19:09.613 回答
0

问题可能在于使用 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 urlgit@myhost.com:/home/git/repositories/gitolite-admin.git

然后尝试推动。

于 2014-06-20T13:07:27.063 回答