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

0 votes
Accepted answer

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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

656 views 5 9
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