我已经用 gitolite 安装了 Gitlab,整个站点工作正常,它创建 repos 就好了......
但是,当我尝试从开发机器推送一些代码时,它会引发一个错误......
git init
git remote add origin ssh://git@gitbox.com:10000/test_of_mine.git
git add .
git commit -m "first commit"
git push origin master
输出:
fatal: '/test_of_mine.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
当我绕过 gitolite,添加一个具有完整路径的遥控器时,它会找到 repo,但由于绕过而导致另一个错误
git remote add origin ssh://git@gitbox.com:10000/~git/repositories/test_of_mine.git
返回
Delta compression using up to 4 threads.
Compressing objects: 100% (329/329), done.
Writing objects: 100% (667/667), 785.81 KiB, done.
Total 667 (delta 327), reused 639 (delta 311)
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 ssh://git@gitbox.com:10000/~git/repositories/test_of_mine.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://git@gitbox.com:10000/~git/repositories/test_of_mine.git'
为什么我会收到此错误?我是否缺少任何路径配置?
如何配置 gitolite 回购路径,我不需要绕过 gitolite 的方式?
为什么 gitlab 应用程序运行良好,在正确的路径上创建存储库,而不会引发任何错误?