The 'credential-manager is not a git command' error occurs when Git cannot find the credential helper executable. This typically happens when Git Credential Manager is not installed, has been renamed, or the configuration points to an outdated helper name.
This error indicates that Git is trying to use a credential helper called "credential-manager" but cannot find it as a valid Git command or executable. When you interact with remote repositories over HTTPS, Git uses credential helpers to store and retrieve your authentication credentials (like Personal Access Tokens). The credential helper is configured in your Git config via `credential.helper`. If this setting points to a helper that doesn't exist or uses an outdated name, Git reports this error. The most common scenario is having leftover configuration from an older version of Git Credential Manager. In Git 2.39 and later, the credential helper was renamed from `manager-core` to simply `manager`. Additionally, some systems may have configuration referencing `credential-manager` (with a hyphen) which was the legacy helper name from Git Credential Manager for Windows.
First, identify which credential helper(s) are configured and where they're defined:
# Show all credential.helper settings with their source files
git config --list --show-origin | grep credential
# Check specifically what credential helper is set
git config --get-all credential.helperThis will show you output like:
file:/home/user/.gitconfig credential.helper=manager
file:/etc/gitconfig credential.helper=credential-managerThe source file path tells you where each setting comes from (global vs system vs local config).
The credential helper name has changed over time. Update your configuration to use the modern name:
For Git 2.39 and later (recommended):
# Set the credential helper to 'manager' (current name)
git config --global credential.helper managerIf you're on an older Git version:
# Use 'manager-core' for older GCM versions
git config --global credential.helper manager-coreIf you have multiple conflicting settings:
# Replace all credential.helper values with the correct one
git config --global credential.helper manager --replace-allAfter setting this, try your Git operation again.
If you don't need the credential helper or want to reconfigure from scratch, remove the problematic setting:
# Remove from global config
git config --global --unset credential.helper
# If there are multiple values, unset all of them
git config --global --unset-all credential.helperFor system-level configuration (requires admin/root):
# On Linux/macOS
sudo git config --system --unset credential.helper
# On Windows (run as Administrator)
git config --system --unset credential.helperEdit the config file directly if needed:
# Open global config in editor
git config --global --edit
# Look for and remove the [credential] section:
# [credential]
# helper = credential-manager <- remove this lineOn Windows, check these locations:
- User config: %USERPROFILE%\.gitconfig
- System config: C:\Program Files\Git\etc\gitconfig
If Git Credential Manager is not installed, install it:
On Windows:
Git Credential Manager comes bundled with Git for Windows. Reinstall Git for Windows from [git-scm.com](https://git-scm.com/download/win) and make sure to select the Git Credential Manager option during installation.
On macOS:
# Install via Homebrew
brew install git-credential-manager
# Configure Git to use it
git-credential-manager configureOn Linux (Debian/Ubuntu):
# Download the latest .deb package from GitHub releases
# https://github.com/git-ecosystem/git-credential-manager/releases
# Install the package
sudo dpkg -i gcm-linux_amd64.X.X.X.deb
# Configure Git to use it
git-credential-manager configureUsing .NET tool (cross-platform):
# Requires .NET SDK 8.0+
dotnet tool install -g git-credential-manager
# Configure Git to use it
git-credential-manager configureIf you don't want to use Git Credential Manager, configure an alternative:
Cache credentials in memory temporarily:
# Cache for 1 hour (3600 seconds)
git config --global credential.helper 'cache --timeout=3600'Store credentials in a plain text file (less secure):
git config --global credential.helper store
# Credentials saved to ~/.git-credentialsOn macOS, use the built-in Keychain:
git config --global credential.helper osxkeychainOn Linux with GNOME Keyring:
git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyringOr simply use SSH instead of HTTPS (no credential helper needed):
# Change remote from HTTPS to SSH
git remote set-url origin [email protected]:username/repo.gitIf you're getting the error because configuration references credential-manager but you have credential-manager-core installed (or vice versa), you can create a Git alias as a quick workaround:
# If error is about 'credential-manager' but you have 'manager-core'
git config --global alias.credential-manager "credential-manager-core"
# If error is about 'credential-manager-core' but you have 'manager'
git config --global alias.credential-manager-core "credential-manager"Note: This is a temporary workaround. The proper solution is to update your credential.helper configuration to match your installed version (Step 2).
After applying the fix, verify that the error is resolved:
# Check the current credential helper
git config credential.helper
# Test by fetching from a remote repository
git fetch origin
# Or test the credential helper directly
git credential-manager --version
# Or for older versions:
git credential-manager-core --versionIf the command succeeds without the "not a git command" error, the issue is resolved.
If you're still seeing issues:
# Check if there are multiple credential helpers configured
git config --get-all credential.helper
# Look for all credential-related settings
git config --list | grep credential### Understanding Git Credential Helper Names
The Git Credential Manager project has gone through several iterations with different names:
| Era | Helper Name | Notes |
|-----|-------------|-------|
| Legacy | credential-manager | Original GCM for Windows |
| GCM Core | manager-core | Cross-platform rewrite (2020-2023) |
| Current | manager | Renamed in Git 2.39+ (2023+) |
When upgrading Git or GCM, your configuration may reference an older name that no longer exists.
### Checking for Multiple Credential Helpers
Git processes credential helpers in order. If you have multiple configured:
git config --get-all credential.helperGit tries each one sequentially. If the first fails with "not found", it continues to the next. This is why you might see the error but Git operations still complete.
### Windows-Specific Locations
On Windows, credential helper configuration can exist in multiple places:
1. System config: C:\Program Files\Git\etc\gitconfig
2. Global config: %USERPROFILE%\.gitconfig
3. Local config: .git/config in each repository
Check all locations if the error persists after changing global config.
### Git for Windows Installation Options
When installing Git for Windows, you're asked to choose a credential helper:
- Git Credential Manager - Recommended, handles OAuth, 2FA
- None - No credential storage
If you selected "None" during installation, you'll need to either reinstall or manually install GCM.
### WSL (Windows Subsystem for Linux)
When using Git in WSL, you can share the Windows credential manager:
# In WSL, configure Git to use Windows GCM
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"### Debugging Credential Helper Issues
# Enable Git tracing to see credential helper execution
GIT_TRACE=1 git fetch origin 2>&1 | grep credential
# Test credential helper directly
echo "protocol=https
host=github.com" | git credential-manager get### Corporate/Enterprise Environments
In corporate environments, system administrators may set credential helpers via system config. If you can't modify system config:
# Override system config with local config
cd /path/to/repo
git config --local credential.helper managerwarning: BOM detected in file, this may cause issues
UTF-8 Byte Order Mark (BOM) detected in file
fatal: Server does not support --shallow-exclude
Server does not support --shallow-exclude
warning: filtering out blobs larger than limit
Git partial clone filtering large blobs warning
fatal: Server does not support --shallow-since
Server does not support --shallow-since in Git
kex_exchange_identification: Connection closed by remote host
Connection closed by remote host when connecting to Git server