error pushing to bitbucket server

I get the following error when trying to push a new repo to my bitbuket server.  I have seen this error before and usually I just close Sourcetree and reopen it and the error goes away, but this time the error is happening every time.

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master
POST git-receive-pack (31653617 bytes)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; result=22, HTTP code = 400
Pushing to https://xxxxxxxxx/xxxxx/xxxxx/xxxxxxxxxxxxxx.git
Everything up-to-date

Completed with errors, see above.



Any ideas?

3 answers

1 accepted

This ended up being a firewall issue within my company's network. I was able to push files once they opened up the firewall for me.

Hi there, I did find that article and tried increasing my http.postBuffer using the following command, and I still received the same error:


  • git config --global http.postBuffer 157286400

also, that article is referring to error 411. the error I am getting is 400



Did you also check the other 2, related to proxy configuration?

the 2nd one links to this article

which suggests setting some configuration properties, but it doesn't specify where in Bitbucket Server (or local file) to change them.  do you know where those configurations are stored?

it appears that the 2nd resolution is related to NGINX server which i'm not using, the the 3rd resolution is referring to changing proxy settings.  I'm not sure if that's the issue either since i can commit some of my projects to repositories, just not others.

It appears that the previous suggestion does not apply in my situation.  Is there any other suggestions? Thanks.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,196 views 26 12
Join discussion

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