Gitolite拒绝接受对gitolite-admin.git的承诺

时间:2016-03-07 15:24:39

标签: gitolite

我正在关注this教程,在我的Debian PC上安装一个gitolite服务器。一旦有效,我打算从虚拟机连接到它,以模拟客户端连接。

$ cd ~/ssh
$ ssh-keygen glite
$ sudo apt-get install gitolite3
$ export GL_LIBDIR=/home/default/bin/lib
$ export GL_BINDIR=/home/default/bin
$ gitolite setup -pk /home/default/.ssh/glite.pub
$ cd ~/projects
$ git clone ../repositories/gitolite-admin.git
#  make some changes
$ git push origin master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 413 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: WARNING: Use of uninitialized value $repo in concatenation (.) or string at /home/default/bin/lib/Gitolite/Conf/Load.pm line 251, <DATA> line 1.
remote: 
remote: FATAL: invalid repo ''
remote: error: hook declined to update refs/heads/master
To ../../repositories/gitolite-admin.git/
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '../../repositories/gitolite-admin.git/'

因此某些变量$repo在某些python脚本中是空的。我错过了什么?

1 个答案:

答案 0 :(得分:0)

也许您的本地用户只有阅读权限? 检查

中的条目
../repositories/gitolite-admin/conf/gitolite.conf

应该有一个与keydir中的glite.pub文件名相对应的条目。

repo    gitolite-admin
    RW+     =   glite