[BUG] Windows: "unable to find CLAUDE_CODE_GIT_BASH_PATH" despite Git Bash being installed and accessible

Resolved 💬 3 comments Opened Apr 14, 2026 by sardxz Closed Apr 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

After losing access to my previous Windows user account ("pearc"), I created a new account ("Sardinha") on the same PC. Git is freshly installed and fully functional, but Claude Code refuses to start, showing:

Claude Code on Windows requires git-bash. If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe

Everything checks out on my system:

  • Test-Path "C:\Program Files\Git\bin\bash.exe" → True
  • & "C:\Program Files\Git\bin\bash.exe" -c "echo ok" → ok
  • node -e "console.log(require('fs').existsSync('C:\\Program Files\\Git\\bin\\bash.exe'))" → true
  • icacls confirms full read/execute permissions for all users
  • C:\Program Files\Git\bin is in PATH, where.exe bash finds it
  • CLAUDE_CODE_GIT_BASH_PATH env var set at both User and Machine level

What I've tried (none worked):

  • Setting CLAUDE_CODE_GIT_BASH_PATH to the bash.exe path (User + Machine level)
  • Setting it to the directory (C:\Program Files\Git\bin)
  • Setting it inline in the session ($env:CLAUDE_CODE_GIT_BASH_PATH = ...)
  • Adding C:\Program Files\Git\bin to PATH permanently
  • Full uninstall (npm uninstall -g) + cache clean + removing ~/.claude + reinstall
  • Deleting .claude.json (which had repo paths referencing old user "pearc")

Environment:

  • Windows 11 (new local user account)
  • Git 2.47.1.1
  • Node.js (via npm global install)
  • Claude Code: latest from npm
  • PowerShell 5.x

What Should Happen?

Claude Code should detect the Git Bash installation at C:\Program Files\Git\bin\bash.exe and start normally, either automatically or when CLAUDE_CODE_GIT_BASH_PATH is set.

Error Messages/Logs

Steps to Reproduce

  1. Have a Windows PC with a previous user account that had Claude Code installed
  2. Create a new Windows user account on the same machine
  3. Install Git fresh on the new account (confirmed at C:\Program Files\Git\)
  4. Install Claude Code via npm install -g @anthropic-ai/claude-code
  5. Run claude in PowerShell
  6. Error: "Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path C:\Program Files\Git\bin\bash.exe"
  7. Set env var: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
  8. Run claude again — same error
  9. Uninstall, clean cache, delete ~/.claude, reinstall — error changes to:

"Claude Code on Windows requires git-bash. If installed but not in PATH, set environment variable..."

  1. Set env var again — back to original error from step 6

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.107 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗