Git: git: 'credential-osxkeychain' is not a git command. See 'git --help'
Git is configured to use the macOS keychain helper, but the helper binary isn't found by the Git you're running.
git: 'credential-osxkeychain' is not a git command. See 'git --help'git credential-osxkeychain is not a git command'credential-osxkeychain' is not a git commanderror: git-credential-osxkeychain: command not found Meaning
Apple's Git bundles git-credential-osxkeychain. A Homebrew Git or Xcode switch can lose it. Fix with git config --global credential.helper osxkeychain after ensuring /usr/bin/git or installing the helper: brew install git includes it in libexec/git-core. Or use git-credential-manager.
Common causes
- Homebrew/alternate Git without the helper in PATH
- Xcode/CLT reinstall removed it
- credential.helper set but binary not found
- Unusual PATH ordering
- Git installed via another package manager
⚡ Quick fix
- Use Apple Git:
/usr/bin/git --version - Reinstall:
brew reinstall git - Set helper:
git config --global credential.helper osxkeychain
Detailed fix by platform
macOS
git config --show-origin --get-all credential.helper && ls $(git --exec-path) | grep osxkeychain
How to diagnose
- Git — Which binary?
- Helper — Exists in exec-path?
- Config — credential.helper?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Authentication failed fatal: Authentication failed for 'https://github.com/x/y.git/'
- Bad configuration option: usekeychain ssh: /Users/me/.ssh/config: line 5: Bad configuration option: usekeychain
- Homebrew Cask: It seems there is already an App at Homebrew: Error: It seems there is already an App at '/Applications/Chrome.app'
Most viewed in macOS
- is damaged and can’t be opened macOS: “App” is damaged and can’t be opened. You should move it to the Trash.
- Operation not permitted (macOS privacy) macOS: Operation not permitted — Terminal/app lacks Full Disk Access (TCC privacy protection)
- zsh: command not found: brew macOS: zsh: command not found: brew (Homebrew not on PATH on Apple Silicon)
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026