Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

! [remote rejected] master -> master (pre-receive hook declined)

Having tried several modifications of the GIT PUSH command and having consistently received the identical failed result.  I reset the following two GIT parameters to true and ran a simple GIT PUSH command.

The parameters:

• export GIT_TRACE=1

Please consider the following entries that appeared in the two TRACE reports:

00:19:31.466801 pkt-line.c:46 packet: push< 9e90193697bf3ea2ad1fc750fa19add51f1486c4 refs/heads/Branch-to-Write\0report-status delete-refs side-band-64k quiet atomic ofs-delta agent=git/2.10.5

00:19:31.527740 pkt-line.c:46 packet: push> 0a5e60b5cd0fe68e2c981d5407b6cac14e3ff79d d8c040f55a91ef9532ab572235fcabf21ae02a10 refs/heads/master\0 report-status side-band-64k agent=git/2.2.1

00:19:31.527953 run-command.c:351 trace: run_command: 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'

00:19:31.529569 exec_cmd.c:130 trace: exec: 'git' 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'

00:19:31.538291 git.c:349 trace: built-in: git 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'

Do any of the above provide a clue to the following error message:

00:19:32.131730 pkt-line.c:46 packet: push< \2Permission denied to update branch master.
remote: Permission denied to update branch master.00:19:32.132723 pkt-line.c:46 packet: push< \1000eunpack ok0033ng refs/heads/master pre-receive hook declined0000

Note:  the Branch-to-Write repository was set up by my partner.  I gave him write permissions and asked him to create for himself a branch.  He modified a file and push it to origin master on the Bitbucket cloud.  His push is properly logged.

Please advise.


3 answers

1 accepted

0 votes
Answer accepted

Hello @kiusau,

It looks like you have branch restrictions in place for the master branch. Specifically, no one can push to that branch directly.

Can you double check repository settings and confirm or disprove this assumption?

Let me know what you find.


If it is any clue, I did not have this problem before I granted write privileges to my new development partner, and he has not reported any problems.

In order to incorporate recent changes that he appears to have made online I recall having invoked a PULL request and MERGE command from the BitBucket interface -- both of these succeeded.  These changes were then pulled to my local repository at GIT's suggestion.

As already stated, I have since deleted my local repository and cloned it afresh.  After redoing the troubled commit with a new ADD and COMMIT I received the same error message when I tried to PUSH it.


Hello @kiusau,

I can't say for sure without knowing what is the repository in question, but what you describe sounds like branch permissions – in this case recloning and pushing again should indeed fail.

Can you check the following for me please:

  • Go to your repository Settings
  • Click on Branch permissions

What do you see on the right side of the screen? Is there a table with some rules, like one in the red rectangle on my screenshot?

 Branch permissions — Bitbucket 2019-12-15 18-36-41.png

Or is there an empty state screen, like this one?

 Branch permissions — Bitbucket 2019-12-15 18-40-49.png

If you have some branch permissions (like on the first screenshot) please double check their configuration or post a screenshot here – I believe you have a rule preventing pushes to your master branch.

Let me know what you find.


My menu is not blank, as you suggest, but I see nothing that would deny my ability to PUSH unless, of course, there is something about a PUSH command that I do not understand.  This latter is, of course, very likely, as I am still very new to Bitbucket and the use of GIT.

Now, it does add special restrictions, but these restrictions, if am reading them correctly restrict only two things:  one, the ability to destroy the branch, and two, the ability to change the history. But neither, of these two restrictions refers to a specific group or user.

Finally, the owner (me) is listed, but in this context only mention of my recent PULL and MERGE requests is made.

Please advise.



So from your initial post, you're trying to push some commits to master but get this error back:

00:19:32.131730 pkt-line.c:46 packet: push< \2Permission denied to update branch master.
remote: Permission denied to update branch master.

This is because you have a restriction to not allow anyone push to master:


The only way to apply changes to master with your current setup is to open a pull request against it, which then can only be merged by you (this is the second setting in that permission – where your username is shown).

If you want to be able to push to master directly, you need to update this branch permission or remove it (depending on what is the desired workflow you'd like to enforce).

Hope this helps. Let me know if you have any questions.


Hi, Daniil!

Last login: Sat Dec 14 20:25:56 on ttys000
$ git push --all
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 539 bytes | 0 bytes/s, done.
Total 5 (delta 3), reused 0 (delta 0)
To ... dc64360..5e88b25 master -> master

I would like to thank you for your help and ask one last question.  Is it now possible to deny PUSH permissions to my partner.  Or, is that even necessary so long as I check to see what he has done before pulling his changes to my own local repository.


No worries, I'm glad we found what was causing the problem :)

Is it now possible to deny PUSH permissions to my partner.

There's no way to blacklist users, only whitelist. That is, you can allow only some specific users to push directly – if you add only yourself, no one except you will be able to push to a branch directly.

 Branch permissions — Bitbucket 2019-12-16 13-19-46.png

Or, is that even necessary so long as I check to see what he has done before pulling his changes to my own local repository.

This depends on the repository permissions settings. If you allow write access, they can write to any branch unless there're branch permissions in place. If you use fork-pull request strategy, you can keep just read access for them, and hence such branch permission isn't necessary.


Daniil!  You have been one very helpful contributer.  May you spend a very happy holiday!  Many thanks!


Like Daniil Penkin likes this

Thank you for the kind words! I'm always happy to help :)

Hi, Danill.  I would like to thank you for responding, but after two days of fumbling I decided to start over and reinstalled the repository on my local machine and recommit the desire change.  Unfortunately, the result was the same.

Now, I have explored the link that you provided, as well as my setting, and can find nothing wrong.  Now, it may be that I am looking in the wrong place, but truly I have done my best.

Can you suggest anything else? 

I am very frustrated and would hate to have set up a new Bitbucket account each and every time that I run into trouble, as I am not the only one who is using it.


0 votes

I have had the same error-message, and it turned out, that Author-name in the Commit is wrong, and therefore no access. I'm looking for a way to change it. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

530 views 4 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you