sync: auto-sync from DESKTOP-0O8A1RL at 2026-05-21 17:00:27

Author: Mike Swanson
Machine: DESKTOP-0O8A1RL
Timestamp: 2026-05-21 17:00:27
This commit is contained in:
2026-05-21 17:00:30 -07:00
parent f1d7b9dfae
commit e3a56bcb21
3 changed files with 6 additions and 53 deletions

View File

@@ -1,6 +1,6 @@
---
name: windows-openssh
description: Use system OpenSSH (bare `ssh`); never Git for Windows SSH; the backslash hook blocks full Windows paths
description: Use system OpenSSH (bare `ssh`); never Git for Windows SSH; use forward slashes for all Windows paths in Git Bash
applies-to: all
---
@@ -17,24 +17,18 @@ Do not use Git for Windows SSH (`C:\Program Files\Git\usr\bin\ssh.exe`). The sys
## Use bare `ssh`, not the full path
The pre-bash-backslash hook at `.claude/hooks/pre-bash-backslash.sh` blocks any Bash command that contains Windows-style backslash paths (e.g., `C:\Windows\System32\OpenSSH\ssh.exe`). This hook exists to prevent accidental backslash path usage in Git Bash, which interprets `\` as escape sequences.
The system OpenSSH is on `PATH` in Git Bash, so use the bare command:
The system OpenSSH is on `PATH` in Git Bash, so prefer the bare command. Always use forward slashes for any Windows path you do pass explicitly — Git Bash interprets backslashes as escape sequences.
```bash
# Correct — uses system OpenSSH via PATH
ssh guru@172.16.3.30 "sudo /opt/gururmm/build-server.sh"
ssh -i C:/Users/guru/.ssh/id_ed25519 guru@172.16.3.30 "command"
# Wrong — full backslash path blocked by hook
C:\Windows\System32\OpenSSH\ssh.exe guru@172.16.3.30 "command"
```
Note: forward-slash paths are fine in Git Bash:
```bash
# This works (forward slashes)
# Also correct — forward slashes in full path
"C:/Windows/System32/OpenSSH/ssh.exe" guru@172.16.3.30 "command"
# But bare ssh is simpler and preferred
# Wrong — backslash path breaks in Git Bash
C:\Windows\System32\OpenSSH\ssh.exe guru@172.16.3.30 "command"
```
## Key file paths