2

我在 Windows Server 2003 上的 git/gitolite 遇到了一些问题(尽管我怀疑操作系统不是问题的根源。)

如果我这样做:

git clone git@server:test.git

我无法克隆:

Cloning into test...
git@server's password:
fatal: 'test.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

如果我这样做:

git clone git@server:repositories/test.git

我可以克隆,但我不能提交:

git@server's password:
Counting objects: 3, done.
Writing objects: 100% (3/3), 229 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
To git@dev.relocationmoverservices.com:repositories/test.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@server:repositories/test.git'

如果我查看 .gitolite.rc 中的 $REPO_BASE,我会看到:

# ------------------------------------------------------------------------------
# variables that should NOT be changed after the install step completes
# ------------------------------------------------------------------------------
$REPO_BASE="repositories";

谁能告诉我在这里做什么?重新安装gitolite?改变变量?这不是问题的原因吗?

4

1 回答 1

1

乔希,

您使用的语法仅适用于未执行远程 gitolite 设置的用户。(出于这个原因,我建议使用 gitolite 文档中的替代管理员设置)要为管理员用户克隆存储库,您必须使用 git clone git@gitolite:repot.git 语法。添加遥控器时,您还必须使用该语法,但它仅适用于您的用户。

同样,这可以通过使用基于管理员/服务的设置来避免。http://sitaramc.github.com/gitolite/doc/1-INSTALL.html#_install_methods_and_deciding_which_one_to_use

于 2011-04-26T13:49:21.747 回答