Sourcetree can't push problem

Dear Support Team 

I have a problem when trying to push , but the pull operation works without problems
You can see the error that appears as follows


git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=manager-st push -v --tags origin feature/newDesign:feature/newDesign

POST git-receive-pack (815 bytes)

remote: Hook com.atlassian.stash.internal.repository.ref.restriction.RestrictionEnforcer failed. Error:        

remote: bundle [com.atlassian.bitbucket.server.bitbucket-ref-restriction]       

Pushing to http://iyousef@

To http://iyousef@

! [remote rejected] feature/newDesign -> feature/newDesign (pre-receive hook declined)

error: failed to push some refs to 'http://iyousef@'

Completed with errors, see above.


Please provide me with any information to resolve the problem

Best Regards 

15 answers

It's seem that i have got the same problem.


Since the update i am not able to push my code to my bitbucket account.

I can push from command line.

ssh -Tv

works fine too. It's seems to be just on Sourcetree. 


I just updated sourcetree to the latest (2.7.1) and I can't perform push command anymore. pull command seems fine. 

I'm able to push through terminal, seems like it's a bug from the new update.



0 votes

Hi Rula, have you tried pushing from the command line too? If you get the same error from the command line, then the issue is not related to Sourcetree and we'll need to figure out what's going on.

Can you also let us know where are you pushing to? Is it Bitbucket Server? Or Bitbucket Cloud? Or Github...?



Dear Ana 

this problem appear when i try push code from Sourcetree to Bitbucket server  

Best Regards

Getting Push/Pull errors as well. Running on Windows. Command line works.

Dear Support Team,

I have the same problem.

I can't push and pull from sourcetree 2.7.4 with Bitbucket Cloud and MacOS.

I  can push from command line but it's inconvenient.

Please help me



I can confirm that I'm also experiencing this problem currently. I'm using the latest version of SourceTree.

Looking forward to hearing what solutions can be recommended.


0 votes

Same issue. 

0 votes

Similar issue. Push from command line says all is up to date, but viewing source code online shows old source. Local files are not changed, but I can see the changes when double-clicking to edit a file from Sourcetree.

SAME HERE!!!!!!!!!!

How can i push afterall???

0 votes
oscarzhou I'm New Here Dec 03, 2018

The same issue happened to me since yesterday, but I still can push by cli. However, it didn't work on both sides now. 

Also can't push or pull. Anyone found a solution?

0 votes
Devin I'm New Here Dec 14, 2018

I am also have the same problem.

It's January 2019 any answers to this?

For anyone still stuck, I managed to resolve this by going to manage windows credentials (control panel->user accounts->credential manager) and deleting anything with mentioned in the name under the generic credentials section. I.e. it might look like "git:"

I also deleted all the accounts in sourcetree under tools-->options-->authentication (think I did that first) Not sure this step is required.

Now working OK again

Not really a true "solution" to the *root* of the problem being discussed, but in my case, since my previous reply to this discussion, I've long since just been going about all my Git-related business via Git bash, which has worked out perfectly for me.

Would be great to be able to use SourceTree as intended, but until such a time comes, I'll just continue using Git bash (which has thus far worked perfectly for me, without any major problems) to interact with BitBucket (plus any other Git-related services and platforms).

Sharing this information, not to have a go at SourceTree, nor to complain, but simply because it might indicate a possible solution for others in the same situation as my own (in the sense that maybe that hadn't yet considered using Git bash to handle all their Git-related business).

(Also, AFAICT, the root of the problem is definitely SourceTree, and neither BitBucket itself nor anything else at Atlassian's side of things. I say this, because although I've experienced the issue being discussed with SourceTree before, I've never actually experienced any problems wih BitBucket itself before).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

950 views 4 2
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you