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

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:


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. 

Like 1 person likes this

Suggest an answer

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

Building a Bitbucket Pipe as a casual coder

....sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables ROLLBAR_ACCESS_TOKEN...

159 views 0 11
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