Troubleshooting Git LFS push failure: 'HTTP 413' error message


 

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

   

Summary

This knowledge article provides a potential reason for this error message occurring, with troubleshooting steps to resolve the issue.

Diagnosis

When attempting to push to GIT LFS, some variant of the following error message occurs:

LFS: Client error: https://api.media.atlassian.com/upload/{OID}/binary?hashAlgorithm=sha256 from HTTP 413
error: failed to push some refs to 'https://<Username>@bitbucket.org/<WorkspaceID>/<RepoName>.git'

Cause

This error occurs because the pushed files exceed the 10 GB file size limitation. As per our GIT LFS documentation, there is a 10 GB file size upload limit for LFS. This limitation applies to individual file sizes, so if you attempt to push a file larger than 10 GB, the operation will fail with a HTTP 413 error.

(info) It's important to note that this limitation is per file, and does not refer to the total size of all files that you are pushing to GIT LFS. For example, if you have ten files, each 1 GB, the full size would be 10 GB. The push will not fail in this case, as it does not involve a single file exceeding the 10 GB limit.

Solution

There are two workarounds that are available as follows:

  1. Compress your large files to reduce the size:
    • Several compression tools are available, but one of the most commonly used is gzip. Depending on your platform and requirements, you can also consider using bzip2, 7-Zip, or WinRAR.
  2. Split the files into smaller sizes.
    • Split the file into smaller parts using the split command. For example, splitting a 10 GB size into 500 MB chunks:

      split -b 500M myfile.dat myfile-part-

Notice

If your repository has a large LFS size, it can significantly affect Git clone, pull, and push operations. Therefore, assessing whether you genuinely require these files in your remote repository is essential. If not, consider excluding the files or make use of .gitignore to exclude these files from being pushed to the remote repository.

If the above instructions do not assist in resolving the issue, please raise a support ticket or raise a community support ticket for further assistance with this.

DescriptionTroubleshooting Git LFS push failure: 'HTTP 413' error message
ProductBitbucket Cloud
Last modified on Feb 5, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.