Skip to content

Commit d48cfed

Browse files
cwstramerceyz
andauthored
fix(git): respect GIT_SSH_COMMAND and GIT_SSH (#4381)
* Respect GIT_SSH(_COMMAND) * Version bumps * Backticks * chore: versions Co-authored-by: merceyz <[email protected]>
1 parent 1ac2ff4 commit d48cfed

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.yarn/versions/fde815c3.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-git": patch
4+
5+
declined:
6+
- "@yarnpkg/plugin-compat"
7+
- "@yarnpkg/plugin-constraints"
8+
- "@yarnpkg/plugin-dlx"
9+
- "@yarnpkg/plugin-essentials"
10+
- "@yarnpkg/plugin-github"
11+
- "@yarnpkg/plugin-init"
12+
- "@yarnpkg/plugin-interactive-tools"
13+
- "@yarnpkg/plugin-nm"
14+
- "@yarnpkg/plugin-npm-cli"
15+
- "@yarnpkg/plugin-pack"
16+
- "@yarnpkg/plugin-patch"
17+
- "@yarnpkg/plugin-pnp"
18+
- "@yarnpkg/plugin-pnpm"
19+
- "@yarnpkg/plugin-stage"
20+
- "@yarnpkg/plugin-typescript"
21+
- "@yarnpkg/plugin-version"
22+
- "@yarnpkg/plugin-workspace-tools"
23+
- "@yarnpkg/builder"
24+
- "@yarnpkg/core"
25+
- "@yarnpkg/doctor"

packages/plugin-git/sources/gitUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function makeGitEnvironment() {
1111
return {
1212
...process.env,
1313
// An option passed to SSH by Git to prevent SSH from asking for data (which would cause installs to hang when the SSH keys are missing)
14-
GIT_SSH_COMMAND: `ssh -o BatchMode=yes`,
14+
GIT_SSH_COMMAND: process.env.GIT_SSH_COMMAND || `${process.env.GIT_SSH || `ssh`} -o BatchMode=yes`,
1515
};
1616
}
1717

0 commit comments

Comments
 (0)