Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hook declined to update issue while deleting remote branch

Tags:

git

gitolite

I am getting some issue while deleting remote branch (using git).
I have issued following command:

git push origin :newpdo

remote: Fatal: +refs/heads/newpdo myusername DENIED by fallthru <br>
remote: error: hook declined to update refs/heads/newpdo <br>
[remote rejected] newpdo &lt;hook declined &gt; <br>
error: failed to push some references to 'ssh://myssh path'

However, I am not getting any issues while "git push origin pdo"

Am I missing something?


Any suggestions?

like image 569
Monu D Avatar asked Jul 02 '13 11:07

Monu D


1 Answers

remote: Fatal: +refs/heads/newpdo myusername DENIED by fallthru

"fallthru" means that repo is probably managed by gitolite, which has fallthru rules:

  • all the rules for this user and this repo are collected and examined in the sequence they appear in the conf file
  • for each rule:
    • If the ref does not match the refex, the rule is skipped.
    • If it's a deny rule, access is denied and the matching stops.
    • If the permission field matches the specific type of write operation, access is allowed and the matching stops.
  • If no rule ends with a decision, ("fallthru"), access is denied.

In your case, you don't have the right to delete a branch.
The admin of gitolite (owner of the gitolite-admin repo) can easily amend those rights in order to grant you that feature.

You might have RW, for push existing ref or create new ref.
But you might not have RW+, for "push -f" or ref deletion allowed (i.e., destroy information or branch deletion).

like image 79
VonC Avatar answered Sep 17 '22 13:09

VonC