Git LFS "git lfs push ... 413 Request Entity Too Large" in CI
The LFS object upload was rejected with 413 Request Entity Too Large. Either the LFS server enforces a per-object cap or a proxy in front of it limits request body size below the object.
What this error means
git lfs push fails with "LFS: [413] Request Entity Too Large" for a large object while smaller objects upload fine.
git-lfs
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s
LFS: [413] Request Entity Too Large: https://lfs.internal.example.com/objects/...
error: failed to push some refsCommon causes
A reverse proxy caps request body size
A self-hosted LFS server behind nginx or similar may set a low client_max_body_size, rejecting large object uploads with 413.
The LFS server enforces a per-object limit
Some LFS backends refuse objects above a configured size, returning 413 for the offending blob.
How to fix it
Raise the proxy body-size limit
- Identify the proxy in front of the LFS server.
- Increase its max body size above the largest object.
- Retry the push.
nginx.conf
# nginx in front of the LFS server
client_max_body_size 5g;Split or shrink oversized objects
Where the server limit is fixed, reduce object size (compress, chunk) or move very large artifacts to dedicated storage.
How to prevent it
- Set proxy body-size limits above your largest LFS object.
- Keep LFS objects within the server per-object cap.
- Store extreme artifacts outside LFS when they exceed limits.
Related guides
Git push "exceeds GitHub's file size limit" (LFS not tracking) in CIFix "this exceeds GitHub's file size limit of 100.00 MB" in CI - a large file was committed as normal git con…
Git LFS "LFS: Fatal error: Server error" (500) in CIFix Git LFS "LFS: Fatal error: Server error" in CI - the LFS object store returned a 5xx while streaming an o…
Git LFS "Error downloading object ... (missing)" in CIFix Git LFS "Error downloading object: ... (missing)" in CI - the pointer references an object the LFS server…