How to fix git: 'credential-manager' is not a git command in Git
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.
Quick fix
Fixes git: 'credential-manager' is not a git command
# 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.helper- Check your current credential helper configuration
- Update credential helper to use correct name
- Remove the invalid credential helper configuration
- Install Git Credential Manager
# Show all credential.helper settings with their source filesgit config --list --show-origin | grep credential# Check specifically what credential helper is setgit config --get-all credential.helpergit: 'credential-manager' is not a git command
What this error means
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.
Typical symptoms
- Error message appears when running git push, pull, fetch, or clone
- Warning shows: git: 'credential-manager' is not a git command. See 'git --help'
- Git operations complete but show the error message first
- Error occurs after upgrading Git or Git Credential Manager
- Error appears after installing a new version of Git for Windows
- Multiple credential helper warnings appear sequentially
- Authentication prompts appear unexpectedly despite having stored credentials
- Error message mentions 'credential-manager-core' instead of 'credential-manager'
Common causes
- Git Credential Manager is not installed on your system
- Git configuration references outdated helper name (credential-manager instead of manager)
- Configuration left over from uninstalled Git Credential Manager
- Git was installed without the credential manager component
- System and global git configs have conflicting credential.helper values
- Git Credential Manager was renamed in a recent update (manager-core to manager)
- Path to the credential helper executable is not in system PATH
- Corrupted Git installation missing credential helper binaries
How to fix "git: 'credential-manager' is not a git command"
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 git@github.com: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 credentialAdvanced notes
### 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 managerFrequently asked questions
- What does "git: 'credential-manager' is not a git command" mean?
- 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). helper.
- How do I fix "git: 'credential-manager' is not a git command"?
- 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.
- What causes "git: 'credential-manager' is not a git command"?
- Git Credential Manager is not installed on your system Git configuration references outdated helper name (credential-manager instead of manager) Configuration left over from uninstalled Git Credential Manager
- Is the "git: 'credential-manager' is not a git command" 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
- ๐ฌStack Overflow - 'credential-manager' is not a git command(Stack Overflow)
- ๐ฌStack Overflow - git: 'credential-manager' is not a git command(Stack Overflow)
- ๐Git Documentation - gitcredentials(Official Docs)
- ๐Git Book - Credential Storage(Official Docs)
- ๐GitHub - Git Credential Manager(GitHub)
- ๐GCM Installation Documentation(GitHub)