Windows: CLAUDE_CODE_GIT_BASH_PATH not recognized even when file exists
Resolved 💬 3 comments Opened Oct 23, 2025 by luxon-45 Closed Oct 26, 2025
Description
Claude Code native installation fails to recognize the CLAUDE_CODE_GIT_BASH_PATH environment variable on Windows, even though the bash.exe file exists at the specified path and the environment variable is correctly set.
Environment
- OS: Windows 11 24H2 (64-bit)
- Language: Japanese (ja-JP)
- Git Bash version: GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
- Bash location: C:\Program Files\Git\bin\bash.exe
Steps to Reproduce
- Install Git for Windows from https://git-scm.com/downloads/win
- Set environment variable:
CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe - Close all terminals and open a new one (tried CMD, PowerShell, and Administrator PowerShell)
- Attempt to install Claude Code
Attempted Solutions
All of the following approaches failed with the same error:
- ✗
C:\Program Files\Git\bin\bash.exe(with spaces) - ✗
C:\PROGRA~1\Git\bin\bash.exe(8.3 short path format) - ✗
C:\Program Files\Git\usr\bin\bash.exe(alternative location) - ✗ Set as User environment variable
- ✗ Attempted to set as System environment variable (with admin rights)
- ✗ Tested in CMD, PowerShell, and Administrator PowerShell
- ✗ PC restart
Verification
The bash.exe file exists and is executable:
PS> Test-Path "C:\Program Files\Git\bin\bash.exe"
True
PS> & "C:\Program Files\Git\bin\bash.exe" --version
GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
PS> [System.Environment]::GetEnvironmentVariable('CLAUDE_CODE_GIT_BASH_PATH', 'User')
C:\Program Files\Git\bin\bash.exe
Error Message
Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "C:\Program Files\Git\bin\bash.exe"
Expected Behavior
Claude Code should recognize the CLAUDE_CODE_GIT_BASH_PATH environment variable when it points to a valid bash.exe file.
Additional Context
- The environment variable is visible in PowerShell after terminal restart
- The file exists and is executable from PowerShell
- Multiple path formats have been tested without success
- This appears to be specific to how Claude Code validates or reads the environment variable on Windows
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗