Hello,
I am running a Windows 11 laptop that has had no problem with Bitbucket for 7 months. I frequently push to the master branch of a repo that I own, for which I have Admin access. I began to get the following error:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to [MY_REPO_URL]
It does not resemble other issues on this error here solved because...
I have tried the following to debug:
As precedent...
Could anybody help me get across the pre-receive hooks for the workspace I use? Big thanks in advance!
Hello @Sofía Correa Busquets ,
Welcome to Atlassian Community!
The pre-receive-hook declined error is usually returned when you have some branch restrictions set up in your repository, and the commit you are trying to push does not meet the requirements of that branch restriction.
For example, a user can have a branch restriction that does not allow direct pushing to the master branch, only allowing merging to that branch through Pull Request.
With that in mind, I would suggest checking if there are any branch restrictions in that particular repo (Repository Settings > Branch restrictions) and if they do exist, try to temporarily remove them to see if you are able to push.
Let me know in case you have any questions.
Thank you, @Sofía Correa Busquets !
Patrik S
Thanks Patrik! Even though I have Admin access to this repo, changing from "Admins can write" to "Specific users can write" and adding my own account, worked. I can now also push to other repos without having changed any settings on them 🙌
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am getting this same issue when i am pushed code into Github.
Can you please help me out which setting I have to change inside (Repository Settings > Branch restrictions) .
Thanks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.