git: 'credential-osxkeychain' is not a git command macOS Origin: Platform & cloud Last updated 5 Nov 2026

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.

Exact message you may see 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
Seen on: macOS Git

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

  1. Use Apple Git: /usr/bin/git --version
  2. Reinstall: brew reinstall git
  3. Set helper: git config --global credential.helper osxkeychain

Detailed fix by platform

macOS

  1. git config --show-origin --get-all credential.helper && ls $(git --exec-path) | grep osxkeychain

How to diagnose

  1. Git — Which binary?
  2. Helper — Exists in exec-path?
  3. 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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

Authentication failed — fatal: Authentication failed for 'https://github.com/x/y.git/' (Git)Authentication failedBad configuration option: usekeychain — ssh: /Users/me/.ssh/config: line 5: Bad configuration option: usekeychain (macOS)Bad configuration opt…Homebrew Cask: It seems there is already an App at — Homebrew: Error: It seems there is already an App at '/Applications/Chrome.app' (macOS)Homebrew Cask: It see…npm git dependency error — npm ERR! code 128 — An unknown git error occurred (git dependency install) (npm)npm git dependency er…ssh-agent: keys lost after reboot / passphrase asked every time — macOS: Enter passphrase for key '/Users/me/.ssh/id_ed25519': (every time after restart) (macOS)ssh-agent: keys lost …The specified item could not be found in the keychain (-25300) — macOS: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. (errSecItemNotFound -25300) (macOS)The specified item co…Your Command Line Tools are too outdated — Homebrew: Error: Your Command Line Tools (CLT) are too outdated. Update them from Software Update / Please update to the latest macOS (macOS)Your Command Line Too…zsh: bad CPU type in executable — macOS (Apple Silicon): zsh: bad CPU type in executable: ./tool (macOS)zsh: bad CPU type in …git: 'cre…

Explore the map of this error Full error map →

🧠 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.