Skip to content
Latchkey

Git LFS "Authentication required" credentials error in CI

The LFS server challenged the request for credentials and none were provided. On a CI runner there is no interactive prompt, so the fetch fails immediately with "Authentication required".

What this error means

A fetch prints "Authentication required: Authentication required for https://github.com/acme/app.git/info/lfs" and the checkout aborts.

git-lfs
batch response: Authentication required: Authentication required for
https://github.com/acme/app.git/info/lfs/objects/batch
error: failed to fetch some objects

Common causes

No token was passed to the checkout

A bare git clone in a step without the persisted credentials from actions/checkout sends anonymous LFS requests that are challenged.

A private repo cloned without credentials

For a private repo, the LFS endpoint always requires auth; without a token the batch request is rejected before any object transfers.

How to fix it

Let checkout persist credentials and enable LFS

  1. Use actions/checkout with lfs: true; it configures the token for LFS.
  2. For manual clones, supply the token in the URL or via the git credential helper.
  3. Re-run so the batch request carries credentials.
.github/workflows/ci.yml
- uses: actions/checkout@v4
  with:
    lfs: true

Provide credentials for a manual clone

When cloning outside the checkout action, embed a token so LFS can authenticate.

Terminal
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/acme/app.git

How to prevent it

  • Prefer actions/checkout with lfs: true so credentials persist.
  • Never rely on interactive auth on a CI runner.
  • Store manual-clone tokens in secrets, not in logs.

Frequently asked questions

What causes ""Authentication required: ... info/lfs""?
A bare git clone in a step without the persisted credentials from actions/checkout sends anonymous LFS requests that are challenged.
How do I fix "Authentication required: ... info/lfs"?
Let checkout persist credentials and enable LFS

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card