Skip to content

Commit 8b4dd97

Browse files
authored
🤖 fix: preserve existing GIT_SSH_COMMAND when set (#861)
Instead of overwriting `GIT_SSH_COMMAND` entirely, append SSH options to the existing value. Falls back to `ssh` if not set. This allows users who have custom SSH commands configured (e.g., for specific identity files or proxy settings) to still benefit from our BatchMode and StrictHostKeyChecking options. _Generated with `mux`_
1 parent cc0c9df commit 8b4dd97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/utils/git/gitStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const GIT_FETCH_SCRIPT = `
9292
export GIT_TERMINAL_PROMPT=0
9393
export GIT_ASKPASS=echo
9494
export SSH_ASKPASS=echo
95-
export GIT_SSH_COMMAND="ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new"
95+
export GIT_SSH_COMMAND="\${GIT_SSH_COMMAND:-ssh} -o BatchMode=yes -o StrictHostKeyChecking=accept-new"
9696
9797
# Fast fetch with optimization flags
9898
git -c protocol.version=2 \\

0 commit comments

Comments
 (0)