Pushing to BitBucket Gives "413 Request Entity Too Large" But No Large Files Edited

I am trying to push a local repo (initial commit) into BitBucket using SourceTree. SourceTree gives the following error:

413 Request Entity Too Large

However, the largest file in my repo is 995kb and I get this even if I exclude it. The entire repo is about 36mb.

I set the http.postBuffer to some arbitrarily large value in my local git.

LFS is enabled in the repo.

I get the same error from command line.

TIA for any help.

 

1 answer

0 vote

If you have a reverse proxy like Apache or Nginx sitting in front of the Bitbucket application, and you are attempting to push to http:// or https:// you'll likely have to tweak a parameter in your reverse proxy.

Nginx example:

http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

Thank you, I have referred this to the appropriate people at my company. In the meantime I was able to push using ssh.

To follow on Justin's point, we just resolved this issue for one our clients. We did so by updating the following to the NGINX  Configuration: 

  • Go to /etc/nginx
  • Open the nginx.conf
  • Add the following lines to the configuration:
    • client_max_body_size 500M;
    • client_body_timeout 120s;
  • Restart NGINX

Apache has a similar setting I believe that needs to be updated as well. 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,936 views 1 5
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