# Git LFS "lfs.locksverify" locking not supported in CI

> Fix Git LFS lfs.locksverify prompts and "locking not supported" during push in CI - the push wants a decision on lock verification that CI cannot answer interactively.

Source: https://latchkey.dev/learn/command-reference/git-lfs-locksverify-not-supported-in-ci  
Updated: 2026-06-30

On push, LFS notices the remote advertises file locking and asks whether to verify locks. In CI, where nobody can answer, the push either warns repeatedly or fails; the fix is to set `lfs.locksverify` explicitly.

## 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
```

> `git rev-parse --abbrev-ref HEAD` returns the literal string `HEAD` on a detached checkout rather than a branch name. On GitHub Actions read `github.ref_name` instead; the git command cannot know what it was checked out for.

## FAQ

### What causes Git LFS "lfs.locksverify" locking not supported in CI?

There are 2 common causes: lock verification is left unset in ci and the remote does not implement the locking api. With lfs.locksverify unconfigured, LFS emits the advisory on every push, and a strict setting can block the push if it cannot verify locks.

### How do I fix Git LFS "lfs.locksverify" locking not supported in CI?

There are 2 fixes depending on which cause you have: set locksverify explicitly and persist the setting in .lfsconfig. Work through them in order, since the first is the most common.

### What does Git LFS "lfs.locksverify" locking not supported in CI actually mean?

A push prints "Locking support detected on remote \"origin\".

### How do I stop Git LFS "lfs.locksverify" locking not supported in CI happening again?

Set lfs.locksverify explicitly for CI push jobs. The prevention section lists 3 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
