Josh Kodroff
Josh Kodroff

Reputation: 28101

Can't clone and commit with gitolite

I am having some trouble with git/gitolite on Windows Server 2003 (although I suspect the OS is not the source of the problem.)

If I do this:

git clone git@server:test.git

I can't clone:

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

If I do this:

git clone git@server:repositories/test.git

I can clone, but I can't commit:

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 [email protected]:repositories/test.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@server:repositories/test.git'

If I look at $REPO_BASE in my .gitolite.rc, I see:

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

Can anyone tell me what to do here? Reinstall gitolite? Change the variable? Is this not the cause of the problem?

Upvotes: 2

Views: 2675

Answers (1)

JP Toto
JP Toto

Reputation: 1082

Josh,

The syntax you're using is only for users that did NOT perform the remote gitolite setup. (For this reason I recommend using the alternative admin setup which is in the gitolite docs) To clone repos for the admin user you have to use the git clone git@gitolite:repot.git syntax. You also have to use that syntax when adding remotes but it will only work for your user.

Again, this can be avoided by using the admin/service based setup. http://sitaramc.github.com/gitolite/doc/1-INSTALL.html#_install_methods_and_deciding_which_one_to_use

Upvotes: 1

Related Questions