Skip to content
LatchkeyLatchkey home

Git LFS "LFS: Fatal error: Server error" (500) in CI

The LFS server or its storage backend returned a 5xx while transferring an object. Unlike a 403 or 404, this is a server-side fault and is often transient, clearing on retry.

What this error means

git lfs pull or checkout fails with "LFS: Fatal error: Server error: https://.../objects/..." or "Error downloading object: ... Server error (500)".

git-lfs
Error downloading object: assets/video.mp4 (7c6b5a4):
  LFS: Fatal error: Server error: https://github-cloud.githubusercontent.com/.../7c6b5a4
error: failed to fetch some objects

Common causes

A transient fault in the LFS storage backend

The object store hit a temporary error while streaming the blob. The request was valid; the server failed to complete it.

A large object timing out on the backend

Very large objects over a slow path can trip a backend timeout that surfaces as a 5xx to the client.

How to fix it

Retry the fetch

  1. Re-run git lfs pull; a transient 5xx usually succeeds on a second attempt.
  2. Wrap the fetch in a bounded retry so a single blip does not fail the job.
  3. If it persists for the same object, check the provider status page.
Terminal
for i in 1 2 3; do git lfs pull && break; sleep 10; done

Reduce concurrency for large objects

Lower the transfer concurrency so big objects are less likely to trip a backend timeout.

Terminal
git config lfs.concurrenttransfers 2
git lfs pull

Using this in CI

CI checkouts are shallow and detached by default, which changes the answer this command gives you. Commands that read history, branch names, or tags need the checkout configured for it.

.github/workflows/ci.yml
- uses: actions/checkout@v4
  with:
    fetch-depth: 0   # history, tags, and git describe all need this

- run: |
    git rev-parse --is-shallow-repository   # expect false
    git rev-parse --abbrev-ref HEAD          # prints HEAD when detached

How to prevent it

  • Add a bounded retry around LFS fetches in CI.
  • Cache .git/lfs so a flaky server is hit less often.
  • Lower lfs.concurrenttransfers for very large objects.

Frequently asked questions

What causes Git LFS "LFS: fatal error: server error" (500) in CI?
There are 2 common causes: a transient fault in the lfs storage backend and a large object timing out on the backend. The object store hit a temporary error while streaming the blob.
How do I fix Git LFS "LFS: fatal error: server error" (500) in CI?
There are 2 fixes depending on which cause you have: retry the fetch and reduce concurrency for large objects. Work through them in order, since the first is the most common.
What does Git LFS "LFS: fatal error: server error" (500) in CI actually mean?
git lfs pull or checkout fails with "LFS: Fatal error: Server error: https://.../objects/..." or "Error downloading object: ...
How do I stop Git LFS "LFS: fatal error: server error" (500) in CI happening again?
Add a bounded retry around LFS fetches in CI. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card