Hook refused to update when deleting a remote branch

I am having a problem when deleting a remote branch (using git).
I published the 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 don't get any problems until " git push origin pdo "

Did I miss something?


Any suggestions?

+6
source share
1 answer

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

"fallthru" means the repo is probably controlled by gitolite , which has fallthru rules :

  • all the rules for this user and this repo are collected and checked in the sequence that they appear in the conf file
  • for each rule:
    • If ref does not match the reflex, the rule is skipped.
    • If this is a deny rule, access is denied and compliance stops.
    • If the permission field matches a particular type of write operation, access is allowed and compliance is stopped.
  • If no rule ends with a decision ("fallthru"), access is denied .

In your case, you do not have the right to delete a branch.
The githolite administrator (owner of gitolite-admin repo ) can easily change these rights to give you this feature.

You can have RW , to push an existing ref or to create a new ref.
But you may not have RW+ , for " push -f ", or allow deletion (ie, destroy information or delete a branch).

+11
source

Source: https://habr.com/ru/post/948532/


All Articles