当我使用 gitolite 时,忽略git-daemon
,我可以这样做git clone git://xxx/xxx
,但是当我推送项目时,它显示了错误:
Total 2 (delta 0), reused 0 (delta 0)
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: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) 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://www.54cxy.com/qianfuzi
! [remote rejected] master -> master (hook declined)
但是,当我使用ssh
like git@xxx:xxx.git
它不仅可以克隆,还可以推送,但我想使用git://
克隆和推送,那么我能做些什么让它工作呢?
诀窍是,如果您要克隆由 gitolite 管理的 git 存储库,则该远程存储库将包含post-update
hook (由 Gitolite 保留 http://sitaramc.github.com/gitolite/cust.html#hooks),应该由 gitolite 调用。
通常,您应该能够使用本机 git 协议进行推送,前提是将存储库声明为用户“daemon”可读(参见语法 http://sitaramc.github.com/gitolite/rules.html,并查看“与接口git-daemon http://sitaramc.github.com/gitolite/external.html#umask“ 对于 GitoliteV3)
repo @all
R = gitweb daemon
特殊用户可读的任何存储库daemon
被认为是可读的git-daemon
.
对于每个存储库,都有一个名为的空文件git-daemon-export-ok
在存储库中创建(即repo.git
里面的目录$HOME/repositories
).
所以检查你的 gitolite.conf 文件是否提到了用户daemon
,如果文件$HOME/repositories/git-daemon-export-ok
有没有。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)