From 415389979ffc28efa2587d2628516d71b856bc4c Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Tue, 16 Jun 2026 17:19:28 +0530 Subject: [PATCH] test: set GIT_SSH_COMMAND in V2 remote-fetch test to override env SSH The test fakes GIT_SSH to intercept git fetch over SSH, but the host environment exports GIT_SSH_COMMAND (which takes priority over GIT_SSH), so git was using the real ssh binary and getting a real GitHub 404. Set GIT_SSH_COMMAND to the same fake script so the test is deterministic across environments. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- cli/explain_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/explain_test.go b/cli/explain_test.go index 722c18e..4cb712f 100644 --- a/cli/explain_test.go +++ b/cli/explain_test.go @@ -1962,6 +1962,7 @@ esac exec git-upload-pack "$repo" `), 0o755)) t.Setenv("GIT_SSH", sshScript) + t.Setenv("GIT_SSH_COMMAND", sshScript) // GIT_SSH_COMMAND takes priority over GIT_SSH on systems where it's set globally. t.Setenv("CHECKPOINT_REPO", checkpointDir) require.NoError(t, os.MkdirAll(filepath.Join(localDir, ".trace"), 0o755))