dsavi
dsavi

Reputation: 1883

Gitolite has started giving me errors when I push to a Git repo with errors about "declined hooks"

I have looked at this and this which both describe similar problems but don't offer solutions to my problem. However, Gitolite only started doing this last night and I'm not sure what caused it. Here are the errors I'm getting:

git@server:/path/to/cloned/repo/$ git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 374 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
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 /home/git/repositories/git-repo-name.git/
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '/home/git/repositories/git-repo-name.git/'

Now what is strange is that Gitolite only started complaining now. It has worked fine for the last week or so.

Upvotes: 3

Views: 3664

Answers (1)

fge
fge

Reputation: 121730

This is not the way to use gitolite. Your remote is /home/git/repositories/git-repo-name.git/, which means gitolite is on your own machine.

The remote should be git@localhost:git-repo-name.

Add your own public SSH key to the gitolite-admin repo, fill in gitolite.conf correctly, change your remote (by editing your .git/config) and try again.

And note that you should also have cloned gitolite-admin using git@localhost:gitolite-admin.

Upvotes: 3

Related Questions