LFS tried to build a batch request but the endpoint URL it derived has no protocol scheme. This happens when the remote is an SSH shorthand or a malformed lfs.url, so LFS cannot reach the object API.
What this error means
checkout or git lfs pull fails with "batch request: missing protocol: \"git@github.com:acme/app.git\"" or a similar URL lacking https://.
git-lfs
batch request: missing protocol: "git@github.com:acme/app.git/info/lfs"
error: failed to fetch some objects from 'git@github.com:acme/app.git'
Common causes
The remote uses SCP-style SSH shorthand
A remote like git@github.com:acme/app.git is not a full URL, so the derived LFS endpoint lacks a scheme and LFS rejects it.
A hand-set lfs.url without a scheme
A git config lfs.url or .lfsconfig value that omits https:// produces the same missing-protocol error.
How to fix it
Set an explicit HTTPS LFS endpoint
Configure a full lfs.url with the https scheme for the repo.
Or switch the remote to an https URL so LFS derives a valid endpoint.
Prefer an https clone URL for CI so the LFS endpoint is well formed without extra configuration.
.github/workflows/ci.yml
- uses:actions/checkout@v4with:lfs:true
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@v4with:fetch-depth:0 # history, tags, and git describe all need this- run:|git rev-parse --is-shallow-repository # expect falsegit rev-parse --abbrev-ref HEAD # prints HEAD when detached
How to prevent it
Set lfs.url with an explicit https scheme when overriding it.
Prefer https remotes in CI over SCP-style SSH shorthand.
Validate .lfsconfig URLs include a protocol.
Frequently asked questions
What causes Git LFS "batch request: missing protocol" in CI?
There are 2 common causes: the remote uses scp-style ssh shorthand and a hand-set lfs.url without a scheme. A remote like git@github.com:acme/app.git is not a full URL, so the derived LFS endpoint lacks a scheme and LFS rejects it.
How do I fix Git LFS "batch request: missing protocol" in CI?
There are 2 fixes depending on which cause you have: set an explicit https lfs endpoint and use an https remote in ci. Work through them in order, since the first is the most common.
What does Git LFS "batch request: missing protocol" in CI actually mean?
checkout or git lfs pull fails with "batch request: missing protocol: \"git@github.com:acme/app.git\"" or a similar URL lacking https://.
How do I stop Git LFS "batch request: missing protocol" in CI happening again?
Set lfs.url with an explicit https scheme when overriding it. The prevention section lists 3 changes that keep it from recurring.