17

I am having a problem pushing with git using Gitolite.
When I try this:

git push origin :refs/tags/deployment

I get this error:

remote: D NAME/install.py repos michael DENIED by fallthru
remote: error: hook declined to update refs/tags/deployment
To gitolite@admin:repos
 ! [remote rejected] deployment (hook declined)
error: failed to push some refs to 'gitolite@admin:repos'

I have given the group deploy [of which the user michael is a member of] permission to delete branches in the Gitolite config:

@deply  =   michael

repo  repos

        RWD    =   @deply

I have seen this post: "Unable to push in Git. Why?"

But I am not using any hooks that I am aware of and cannot find anything thing else that might relate.

Is there something im missing perhaps?
Has anybody come across this?

Community
  • 1
  • 1
teak
  • 171
  • 1
  • 1
  • 3
  • What gitolite version are you using? – VonC May 03 '12 at 10:45
  • i installed this version of gitolite: 1.5.4-2 – teak May 03 '12 at 11:13
  • I hope not ;) This should be a V2 or V3: see http://stackoverflow.com/questions/10207919/issue-in-gitolite#comment13110183_10207919 to determine the Gitolite version. – VonC May 03 '12 at 11:40
  • ssh to the server gives me: hello michael, the gitolite version here is 1.5.4-2~bpo50+1 (Debian) – teak May 03 '12 at 11:55
  • That seems to be an *incredibly* **old** version of Gitolite (July 23, 2010), and maybe related to https://github.com/sitaramc/gitolite/blob/09195afd443e3fb92b5c8f62fb3971a176d09c31/src/gitolite.pm#L51 in term of error message. – VonC May 03 '12 at 12:09
  • thanks. ive had a look at the error message and it doesnt help my understanding of the problem unfortunately... id like to upgrade gitolite but im using **ubuntu10.04LTS** and a higher version of gitolite isnt available in the repository for that version... – teak May 03 '12 at 15:30
  • Consider installing it manually... – ThiefMaster May 03 '12 at 15:36

2 Answers2

19

You need RW+ permission for ref changes/deletion

RW+, for "push -f" or ref deletion allowed (i.e., destroy information)

Also, if you're using V2 this may apply:

RWD and RW+D, for ref deletion. Once you use this in a repo, a normal RW+ can no longer delete a ref; it can only rewind

Sources:

http://sitaramc.github.com/gitolite/g2/conf.html

http://sitaramc.github.com/gitolite/rules.html

Mike
  • 235
  • 1
  • 5
-6

This worked for me, when nothing else would:

cd ~gitlab/gitlab
sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_keys RAILS_ENV=production
sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_repos RAILS_ENV=production
Huns
  • 99
  • 1