How to fix fatal: Server does not support partial clone in Git
The 'Server does not support partial clone' error occurs when you try to use Git's partial clone feature (--filter option) against a remote server that hasn't enabled this capability. This is a server-side limitation, not a client issue.
Quick fix
Fixes fatal: Server does not support partial clone
# Check what capabilities the server advertises
git ls-remote --heads <repository-url> 2>&1 | head -20
# For more detailed capability information, use GIT_TRACE
GIT_TRACE_PACKET=1 git ls-remote <repository-url> 2>&1 | grep -i filter- Verify server support by checking capabilities
- Use a full clone instead of partial clone
- Use shallow clone as an alternative
- Request server administrator to enable partial clone
# Check what capabilities the server advertisesgit ls-remote --heads <repository-url> 2>&1 | head -20# For more detailed capability information, use GIT_TRACEGIT_TRACE_PACKET=1 git ls-remote <repository-url> 2>&1 | grep -i filterfatal: Server does not support partial clone
What this error means
The "fatal: Server does not support partial clone" error indicates that the Git server you're connecting to does not have partial clone support enabled. Partial clone is a performance optimization feature introduced in Git 2.19 that allows you to clone a repository without downloading all objects immediately. When you use commands like `git clone --filter=blob:none` or `git clone --filter=tree:0`, you're requesting a partial clone. The client asks the server to only send certain objects (e.g., commits and trees but not blobs), with the expectation that missing objects will be fetched on-demand later when needed. However, partial clone requires both client-side and server-side support. The server must have the `uploadpack.allowFilter` configuration enabled and be running Git 2.18 or later. If the server doesn't advertise this capability, Git will fail with this error rather than silently falling back to a full clone.
Typical symptoms
- git clone --filter=blob:none fails with 'Server does not support partial clone'
- git clone --filter=tree:0 produces a fatal error about partial clone support
- Attempting blobless or treeless clones fails on self-hosted Git servers
- CI/CD pipelines that use partial clone fail when pointed at certain Git repositories
- The --filter option works on GitHub/GitLab but fails on older or self-hosted servers
- Warning message 'filtering not recognized by server, ignoring' appears before failure
Common causes
- Remote Git server does not have uploadpack.allowFilter enabled
- Git server is running a version older than 2.18 that lacks partial clone support
- Self-hosted Git server (Gitea, GitBucket, Gogs) hasn't enabled filter support
- Corporate or on-premises Git server has partial clone disabled by administrators
- Using an older Bitbucket Server version that predates partial clone support
- Server is configured to explicitly deny filter requests for security or performance reasons
How to fix "fatal: Server does not support partial clone"
First, check if the server advertises partial clone support by inspecting its capabilities:
# Check what capabilities the server advertises
git ls-remote --heads <repository-url> 2>&1 | head -20
# For more detailed capability information, use GIT_TRACE
GIT_TRACE_PACKET=1 git ls-remote <repository-url> 2>&1 | grep -i filterIf you don't see "filter" in the advertised capabilities, the server doesn't support partial clone.
The simplest workaround is to remove the --filter option and perform a standard full clone:
# Instead of partial clone
# git clone --filter=blob:none https://git.example.com/repo.git
# Use a regular clone
git clone https://git.example.com/repo.gitThis downloads all objects but ensures compatibility with any Git server.
Shallow clone is an older feature with broader server support. It limits history rather than filtering object types:
# Clone only the most recent commit
git clone --depth 1 https://git.example.com/repo.git
# Clone with limited history (last 10 commits)
git clone --depth 10 https://git.example.com/repo.git
# If you need full history later, you can unshallow
cd repo
git fetch --unshallowShallow clones have been supported since Git 1.5 and work with virtually all Git servers.
If you have access to the server or can request changes from administrators, partial clone can be enabled with:
# On the Git server, enable partial clone support
git config --global uploadpack.allowFilter true
# Optionally, allow specific filter types
git config --global uploadpack.allowAnySHA1InWant trueFor Gitea servers (1.16+), partial clone is enabled by default. For older versions or explicit configuration:
# In app.ini for Gitea
[git]
DISABLE_PARTIAL_CLONE = falseFor GitLab self-hosted, ensure you're running GitLab 12.4+ with Git 2.22+ on the server.
Partial clone has specific version requirements on both client and server:
Server Requirements:
- Git 2.18+ for basic partial clone support
- Git 2.20+ for tree filters (--filter=tree:0)
- Git 2.22+ for optimal performance
Platform-Specific Support:
- GitHub.com: Fully supported
- GitHub Enterprise Server: 2.22+
- GitLab.com: Fully supported
- GitLab Self-Managed: 12.4+ with Git 2.22+
- Bitbucket Cloud: Fully supported (as of 2021)
- Bitbucket Data Center: 7.13+
- Azure DevOps: Supported (blobless clones only)
- Gitea: 1.16+ (enabled by default)
- Gogs: Not supported
Check your server version:
# For GitHub Enterprise, GitLab, etc., check the server's Git version
# This is usually shown in the admin panel or via APIIf the primary server doesn't support partial clone, consider using a mirror that does:
# If your repo is mirrored on GitHub, clone from there
git clone --filter=blob:none https://github.com/org/repo.git
# Then add the original remote for pushing
cd repo
git remote add upstream https://internal-git.example.com/org/repo.git
git remote set-url --push origin https://internal-git.example.com/org/repo.gitThis gives you the benefits of partial clone while still being able to push to your main server.
If you only need specific directories, sparse checkout can reduce disk usage without requiring server-side partial clone support:
# Clone with no checkout initially
git clone --no-checkout https://git.example.com/repo.git
cd repo
# Enable sparse checkout
git sparse-checkout init --cone
# Specify which directories you need
git sparse-checkout set src/frontend docs
# Now checkout - only specified directories are populated
git checkout mainThis still downloads all Git objects but only populates specified directories in your working tree.
Advanced notes
### Understanding Partial Clone Filter Types
Git supports several filter types, each with different use cases:
| Filter | Command | Effect | Server Requirement |
|--------|---------|--------|-------------------|
| Blobless | --filter=blob:none | Omits all blobs | Git 2.18+ |
| Treeless | --filter=tree:0 | Omits all trees and blobs | Git 2.20+ |
| Blob size limit | --filter=blob:limit=1m | Omits blobs larger than 1MB | Git 2.18+ |
| Sparse | --filter=sparse:oid=<path> | Uses sparse specification | Git 2.18+ |
### Server-Side Configuration Details
For server administrators, here's the complete configuration for enabling partial clone:
# Enable filter capability advertisement
git config --global uploadpack.allowFilter true
# Allow fetching any SHA (needed for some partial clone operations)
git config --global uploadpack.allowAnySHA1InWant true
# Fine-grained control over filter types
git config --global uploadpack.filter.allow true
git config --global uploadpack.filter.blob:none.allow true
git config --global uploadpack.filter.blob:limit.allow true
git config --global uploadpack.filter.tree.allow true### Partial Clone vs Shallow Clone Comparison
| Feature | Partial Clone | Shallow Clone |
|---------|---------------|---------------|
| History | Complete | Limited depth |
| On-demand fetch | Yes | No |
| Git blame | Works (fetches as needed) | May not work fully |
| Server requirement | Git 2.18+ | Git 1.5+ |
| Disk savings | Objects not in filter | History before depth |
### CI/CD Pipeline Considerations
When using partial clone in CI/CD:
# GitHub Actions - partial clone works
- uses: actions/checkout@v4
with:
filter: blob:none
# For servers without support, fall back to shallow
- uses: actions/checkout@v4
with:
fetch-depth: 1### Checking Server Capabilities Programmatically
# Detailed capability check
GIT_TRACE_PACKET=1 git ls-remote <url> 2>&1 | grep -E "(filter|partial)"
# If this returns nothing, partial clone is not supported### Protocol Version Considerations
Partial clone requires Git protocol version 2 for optimal operation:
# Ensure protocol v2 is enabled
git config --global protocol.version 2Some older servers may only support protocol v1, which has limited partial clone support.
Frequently asked questions
- What does "fatal: Server does not support partial clone" mean?
- The "fatal: Server does not support partial clone" error indicates that the Git server you're connecting to does not have partial clone support enabled. 19 that allows you to clone a repository without downloading all objects immediately. When you use commands like git clone --filter=blob:none or git clone --filter=tree:0, you're requesting a partial clone.
- How do I fix "fatal: Server does not support partial clone"?
- The 'Server does not support partial clone' error occurs when you try to use Git's partial clone feature (--filter option) against a remote server that hasn't enabled this capability. This is a server-side limitation, not a client issue.
- What causes "fatal: Server does not support partial clone"?
- Remote Git server does not have uploadpack.allowFilter enabled Git server is running a version older than 2.18 that lacks partial clone support Self-hosted Git server (Gitea, GitBucket, Gogs) hasn't enabled filter support
- Is the "fatal: Server does not support partial clone" error serious?
- It is a low-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐Git Official Documentation
- ๐Git - Partial Clone Documentation(Official Docs)
- ๐git-upload-pack Documentation - uploadpack.allowFilter(Official Docs)
- ๐
- ๐Partial Clone Design Notes - Git(Official Docs)
- ๐
- ๐
- ๐ฌ