You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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:
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 !
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) .