How to fix batch response: You have exceeded your GitHub LFS bandwidth in Git
This error occurs when your GitHub account has exceeded its monthly Git LFS bandwidth quota. Free accounts get 1 GB of bandwidth per month, which resets monthly. You can wait for reset, purchase data packs, adjust budget settings, or migrate large files off LFS.
Quick fix
Fixes batch response: You have exceeded your GitHub LFS bandwidth
# Install GitHub CLI if needed
brew install gh # macOS
# or visit https://cli.github.com for other platforms
# Check billing info
gh api /user- Check your current LFS usage
- Adjust GitHub budget settings
- Wait for monthly bandwidth reset
- Purchase additional data packs (legacy) or enable metered billing
# Install GitHub CLI if neededbrew install gh # macOS# or visit https://cli.github.com for other platforms# Check billing infogh api /userbatch response: You have exceeded your GitHub LFS bandwidth
What this error means
This error indicates that your GitHub account has consumed all available Git Large File Storage (LFS) bandwidth for the current billing period. Git LFS is GitHub's solution for versioning large files (binaries, media, datasets) by storing them outside the normal Git repository and replacing them with lightweight pointer files. When you or others clone, pull, or fetch from a repository with LFS-tracked files, each download of those files counts against the repository owner's bandwidth quota. GitHub provides free bandwidth allocations that vary by plan: **Free Bandwidth by Plan:** | Plan | Storage | Bandwidth | |------|---------|-----------| | GitHub Free | 1 GB | 1 GB/month | | GitHub Pro | 1 GB | 1 GB/month | | GitHub Team | 1 GB | 1 GB/month | | GitHub Enterprise | 1 GB | 1 GB/month | Importantly, bandwidth usage is charged to the **repository owner**, not the person downloading. This means if your public repository with LFS files gets forked or cloned frequently, you consume bandwidth even when you're not the one pulling. With GitHub's move to metered billing, additional bandwidth costs $0.0875 per GiB.
Typical symptoms
- Git clone or pull fails with 'batch response: You have exceeded your GitHub LFS bandwidth'
- LFS downloads blocked until the next billing cycle
- Error message: 'This repository is over its data quota'
- CI/CD pipelines fail when checking out repositories with LFS files
- Cannot download LFS-tracked files despite successful git clone of pointer files
Common causes
- Repository with LFS files was cloned or forked many times (popular open-source project)
- CI/CD pipelines repeatedly pulling LFS files without caching
- Large LFS files being downloaded by multiple team members or contributors
- GitHub budget settings set to $0, blocking additional usage beyond free tier
- Bandwidth quota did not automatically reset (rare GitHub billing issue)
- Previous data packs were reset or removed during GitHub billing changes
How to fix "batch response: You have exceeded your GitHub LFS bandwidth"
First, verify your actual LFS storage and bandwidth consumption:
Via GitHub Web UI:
1. Go to https://github.com/settings/billing/summary
2. Scroll down to the Git LFS Data section
3. Review your storage and bandwidth usage for the current period
Via GitHub CLI:
# Install GitHub CLI if needed
brew install gh # macOS
# or visit https://cli.github.com for other platforms
# Check billing info
gh api /userThis helps you understand if you've genuinely exceeded limits or if there's a configuration issue.
GitHub recently moved to metered billing for LFS. If your budget is set to $0, LFS access is blocked once free limits are exceeded.
To update budget settings:
1. Go to https://github.com/settings/billing
2. Click on Budgets & alerts (or navigate to Billing & Licensing > Budgets & alerts)
3. Look for the Git LFS budget setting
4. Either:
- Remove the $0 budget limit
- Increase the budget to allow additional usage
- Uncheck "Stop when budget exceeded" if that option exists
Note: You may need to add a payment method first if you haven't already. Even setting a small budget (like $5) will unblock LFS access.
If you don't want to pay for additional bandwidth, you can wait for your quota to reset.
Understanding the reset:
- Bandwidth resets monthly based on your billing cycle
- Storage does not reset (it's cumulative)
- The reset happens automatically at the start of your billing period
Check when your bandwidth resets:
1. Go to https://github.com/settings/billing/summary
2. Look for the Git LFS section
3. Note your billing cycle dates
Important: Unlike some quotas, you cannot manually trigger a bandwidth reset. If it doesn't reset as expected, contact GitHub Support.
If waiting isn't an option, you can pay for additional LFS resources.
Metered Billing (New Model):
GitHub now charges based on actual usage:
- Storage: $0.07 per GiB per month
- Bandwidth: $0.0875 per GiB per month
To enable:
1. Go to https://github.com/settings/billing
2. Add a payment method if not already added
3. Set a spending limit or budget for Git LFS
Legacy Data Packs:
Previously, GitHub sold data packs at $5/month for 50 GiB of bandwidth each. These may still appear in some billing interfaces but are being phased out in favor of metered billing.
If you need to access the files immediately without waiting or paying, you can download them via GitHub's archive feature.
Enable LFS in archives:
1. Go to your repository on GitHub
2. Click Settings > General
3. Scroll down to Archives section
4. Check Include Git LFS objects in archives
5. Save changes
Download the archive:
# Download as ZIP from GitHub
# Go to your repo > Code > Download ZIP
# Or use the GitHub API
curl -L -o repo.zip https://github.com/OWNER/REPO/archive/refs/heads/main.zipThis downloads all files including LFS objects in a single archive, which may work when direct LFS pulls are blocked.
If you need to push commits but LFS downloads are blocked, you can temporarily disable LFS to push pointer files only.
Temporarily disable LFS:
# Uninstall LFS globally
git lfs uninstall
# Uninstall LFS for current repository only
git lfs uninstall --local
# Now you can push commits (pointer files only, not LFS objects)
git push origin mainWarning: This pushes LFS pointer files without the actual large file content. Other users who clone won't be able to access the actual file contents until LFS is restored.
Re-enable LFS later:
git lfs installIf your bandwidth didn't reset as expected or you're experiencing a billing glitch, contact GitHub Support directly.
Common issues GitHub Support can help with:
- Bandwidth quota not resetting on schedule
- Data packs removed during billing platform migration
- Unexpected charges or usage spikes
- Account-level LFS issues
How to contact support:
1. Go to https://support.github.com
2. Click Contact Support
3. Select Billing as the category
4. Describe the issue with your LFS bandwidth
GitHub Support can manually trigger quota resets in some cases or investigate billing discrepancies.
For long-term solutions, consider moving large files out of Git LFS entirely.
Option 1: Use external storage
Store large files on S3, Google Cloud Storage, or similar:
# Upload to S3
aws s3 cp large-file.bin s3://your-bucket/assets/
# Reference in your project via URL or download scriptOption 2: Remove files from LFS tracking
# Stop tracking a file type
git lfs untrack "*.psd"
# Remove from LFS and add to regular Git (for smaller files)
git rm --cached path/to/file.psd
git add path/to/file.psd
git commit -m "Move file from LFS to regular Git"Option 3: Use BFG Repo Cleaner to rewrite history
# Remove LFS files from history entirely
java -jar bfg.jar --delete-files "*.psd" --no-blob-protection
# Force push (coordinate with team first!)
git push origin --force --allNote: Rewriting history affects all collaborators and requires coordination.
Advanced notes
### Understanding How LFS Bandwidth Is Counted
Git LFS bandwidth is consumed when:
- Downloads count: Cloning, pulling, or fetching LFS objects
- Forks count against owner: When someone forks your repo and pulls LFS files, it counts against YOUR quota
- CI/CD counts: Each pipeline run that checks out LFS files uses bandwidth
What doesn't count:
- Uploads (pushing LFS files to GitHub)
- Viewing files on GitHub.com (they serve a preview, not the full file)
### Self-Hosted Git LFS Server
For teams with heavy LFS usage, consider self-hosting:
# Using lfs-server (Go implementation)
go install github.com/git-lfs/lfs-test-server@latest
# Configure your repo to use custom LFS server
git config lfs.url https://your-lfs-server.com/
# Or in .lfsconfig (committed to repo)
[lfs]
url = https://your-lfs-server.com/### Caching LFS Objects in CI/CD
Reduce bandwidth by caching LFS objects between CI runs:
GitHub Actions:
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache LFS objects
uses: actions/cache@v4
with:
path: .git/lfs
key: lfs-${{ hashFiles('.lfs-assets-id') }}
restore-keys: lfs-GitLab CI:
variables:
GIT_LFS_SKIP_SMUDGE: "1"
cache:
paths:
- .git/lfs
before_script:
- git lfs pull### Monitoring LFS Usage
Create a script to monitor your LFS usage:
#!/bin/bash
# Check GitHub LFS usage via API
# Requires: gh CLI authenticated
gh api graphql -f query='
{
viewer {
login
... on User {
gitLfsStorage
gitLfsBandwidthUsage
}
}
}'### Alternative: Use Git Annex
For very large datasets, consider Git Annex which offers more flexible storage backends:
# Initialize git-annex
git annex init "my repo"
# Add large files
git annex add large-file.bin
# Configure remote storage (S3, rsync, etc.)
git annex initremote s3remote type=S3 bucket=mybucketFrequently asked questions
- What does "batch response: You have exceeded your GitHub LFS bandwidth" mean?
- This error indicates that your GitHub account has consumed all available Git Large File Storage (LFS) bandwidth for the current billing period. Git LFS is GitHub's solution for versioning large files (binaries, media, datasets) by storing them outside the normal Git repository and replacing them with lightweight pointer files. When you or others clone, pull, or fetch from a repository with LFS-tracked files, each download of those files counts against the repository owner's bandwidth quota.
- How do I fix "batch response: You have exceeded your GitHub LFS bandwidth"?
- This error occurs when your GitHub account has exceeded its monthly Git LFS bandwidth quota. Free accounts get 1 GB of bandwidth per month, which resets monthly. You can wait for reset, purchase data packs, adjust budget settings, or migrate large files off LFS.
- What causes "batch response: You have exceeded your GitHub LFS bandwidth"?
- Repository with LFS files was cloned or forked many times (popular open-source project) CI/CD pipelines repeatedly pulling LFS files without caching Large LFS files being downloaded by multiple team members or contributors
- Is the "batch response: You have exceeded your GitHub LFS bandwidth" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚Git Official Documentation
- 📖GitHub Docs - About billing for Git Large File Storage(Official Docs)
- 📖GitHub Docs - Upgrading Git Large File Storage(Official Docs)
- 💬Stack Overflow - How to reset Git LFS bandwidth?(Stack Overflow)
- 💬Stack Overflow - Repository over data quota(Stack Overflow)
- 💬Stack Overflow - Undo git lfs after limit exceeded(Stack Overflow)
- 💬GitHub Community - Bandwidth exceeded while using LFS(Stack Overflow)
- 💬GitHub Community - LFS to Metered Billing FAQ(Stack Overflow)
- 📝