This error occurs when Git LFS fails to download large file objects during checkout or clone operations. Common causes include missing LFS objects on the server, authentication issues, or network problems.
The "Smudge error: Error downloading object" in Git LFS indicates that the smudge filter failed to replace a pointer file with the actual large file content. Git LFS uses a "smudge" filter to convert pointer files (small text files that reference large objects) into the actual binary content when you checkout files. When you clone a repository or checkout a branch, Git LFS intercepts file reads and downloads the real content from the LFS server. If this download fails, you get a smudge error. The error message typically includes the specific URL that returned an error, which helps identify whether the problem is authentication, network connectivity, or a missing object. The underlying issue could be that the LFS object was never pushed to the server, your credentials are invalid or expired, the LFS server is down, or there's a network issue preventing the download. The object ID (SHA-256 hash) in the error message identifies which specific file failed to download.
The most reliable fix is to skip the smudge filter during clone, then fetch LFS files separately:
# Install LFS with smudge disabled
git lfs install --skip-smudge
# Clone the repository (pointer files only)
git clone <repository-url>
cd <repository-name>
# Fetch and checkout LFS files in batch
git lfs pull
# Re-enable smudge for future operations
git lfs install --forceThis approach is faster for large repositories and handles network issues more gracefully since git lfs pull can retry failed downloads.
If you already have the repository and encounter smudge errors during pull or checkout:
# Temporarily disable smudge filter
git config --local filter.lfs.smudge "git-lfs smudge --skip -- %f"
git config --local filter.lfs.required false
# Pull changes (gets pointer files)
git pull --rebase --autostash
# Fetch all LFS objects
git lfs fetch --all
# Checkout LFS files
git lfs checkout
# Re-enable smudge filter
git config --local filter.lfs.smudge "git-lfs smudge -- %f"
git config --local filter.lfs.required trueThis sequence ensures you get the Git history first, then download LFS files separately.
Authentication issues are a common cause. Check and update your credentials:
# Test LFS server connectivity
git lfs env
# Check current LFS endpoint
git config --get lfs.url
# For GitHub, ensure you're authenticated
gh auth status
# For SSH-based repos, you may need HTTPS credentials for LFS
git config lfs.url https://github.com/<owner>/<repo>.git/info/lfsFor GitHub Personal Access Tokens:
# Store credentials
git config --global credential.helper store
git lfs fetch # Will prompt for username/tokenFor Bitbucket with token auth (common issue with duplicate Authorization headers):
# Use SSH for Git but HTTPS for LFS
git config lfs.url https://bitbucket.org/<team>/<repo>.git/info/lfsIf you get 404 errors, the LFS object doesn't exist on the server. This requires access to a working copy:
# Check which files are missing
git lfs ls-files --all | head -20
# If you have access to a working copy with the files, push them:
git lfs push --all origin
# For a specific file that's missing:
git lfs push origin --object-id <sha256-hash>If you don't have the original files:
1. Check if another team member has a complete copy
2. Look for backups or previous clones
3. Consider reverting the commit that added the missing file
4. As a last resort, replace the file with a placeholder and document it
# Find commits that modified the problematic file
git log --all --full-history -- <path-to-file>For slow or unreliable networks, adjust LFS transfer settings:
# Reduce concurrent transfers (default is 8)
git config --global lfs.concurrenttransfers 3
# Increase retry attempts
git config --global lfs.transfer.maxretries 10
# Set longer timeouts
git config --global lfs.activitytimeout 60
git config --global lfs.tlstimeout 60For corporate proxies:
# Configure HTTP proxy for LFS
git config --global http.proxy http://proxy.company.com:8080
git config --global https.proxy http://proxy.company.com:8080
# Or for specific hosts only
git config --global http.https://lfs-server.com.proxy http://proxy.company.com:8080To skip SSL verification (not recommended for production):
git config --global http.sslVerify falseIf LFS is misconfigured, reset it completely:
# Uninstall LFS hooks
git lfs uninstall
# Remove local LFS configuration
git config --local --remove-section filter.lfs 2>/dev/null || true
git config --local --remove-section lfs 2>/dev/null || true
# Reinstall LFS
git lfs install
# Verify configuration
git lfs envCheck that your .gitattributes file is correct:
cat .gitattributesYou should see lines like:
*.psd filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -textIf the primary LFS server is down, you might be able to fetch from a mirror or fork:
# Add an alternative remote
git remote add upstream https://github.com/<original-owner>/<repo>.git
# Configure LFS to use the alternative remote
git config lfs.url https://github.com/<original-owner>/<repo>.git/info/lfs
# Fetch LFS objects from alternative
git lfs fetch upstream --all
# Reset LFS URL if needed
git config --unset lfs.urlFor migrated repositories, you may need to configure the old server URL:
git config lfs.url https://old-server.com/repo.git/info/lfs
git lfs fetch --all
git config lfs.url https://new-server.com/repo.git/info/lfs
git lfs push --all originVerify that local LFS objects aren't corrupted:
# List all LFS objects and their status
git lfs status
# Verify local LFS objects
git lfs fsck
# Prune old and unreferenced objects
git lfs prune --dry-run
git lfs pruneTo see detailed information about a specific LFS pointer:
# View pointer file contents
git lfs pointer --file <path-to-file>
# Check if object exists locally
ls -la .git/lfs/objects/<first-2-chars>/<next-2-chars>/If objects are corrupted, delete them and re-fetch:
rm -rf .git/lfs/objects
git lfs fetch --allUnderstanding Git LFS Smudge/Clean Filters:
Git LFS uses two filters:
- Clean filter: Converts large files to pointer files when staging (git add)
- Smudge filter: Converts pointer files back to large files on checkout
The smudge filter reads a pointer file from stdin and writes the actual file content to stdout. When this fails, you see the smudge error.
LFS Pointer File Format:
version https://git-lfs.github.com/spec/v1
oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393
size 12345Debugging LFS Operations:
# Enable verbose LFS logging
GIT_TRACE=1 GIT_TRANSFER_TRACE=1 GIT_CURL_VERBOSE=1 git lfs pullWindows-Specific Issues:
- Git versions before 2.34.0 have issues with files larger than 4GB
- Line ending issues can affect pointer file parsing
- Use git config core.autocrlf false for LFS repos
CI/CD Considerations:
- Many CI systems need explicit LFS setup: git lfs install && git lfs pull
- GitHub Actions: Use lfs: true in checkout action
- GitLab CI: Set GIT_LFS_SKIP_SMUDGE: "1" and run git lfs pull explicitly
Self-Hosted LFS Servers:
If using a self-hosted LFS server, ensure:
1. Server has sufficient storage and bandwidth
2. SSL certificates are valid
3. Authentication is properly configured
4. Server logs show the actual error cause
kex_exchange_identification: Connection closed by remote host
Connection closed by remote host when connecting to Git server
fatal: unable to access: Proxy auto-configuration failed
How to fix 'Proxy auto-configuration failed' in Git
fatal: unable to access: Authentication failed (proxy requires basic auth)
How to fix 'Authentication failed (proxy requires basic auth)' in Git
fatal: unable to access: no_proxy configuration not working
How to fix 'no_proxy configuration not working' in Git
fatal: unable to read tree object in treeless clone
How to fix 'unable to read tree object in treeless clone' in Git