Skip to content

Commit

Permalink
Disable git credential helpers for all setup commands (#6512)
Browse files Browse the repository at this point in the history
  • Loading branch information
bduffany committed May 6, 2024
1 parent 741c97f commit 646afc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enterprise/server/cmd/ci_runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,8 @@ func (ws *workspace) config(ctx context.Context) error {
{"user.email", "[email protected]"},
{"user.name", "BuildBuddy"},
{"advice.detachedHead", "false"},
// Disable any credential helpers (in particular, osxkeychain)
{"credential.helper", ""},
// With the version of git that we have installed in the CI runner
// image, --filter=blob:none requires the partialClone extension to be
// enabled.
Expand Down Expand Up @@ -1807,7 +1809,7 @@ func (ws *workspace) fetch(ctx context.Context, remoteURL string, branches []str
return status.UnknownErrorf("Command `git remote add %q <url>` failed.", remoteName)
}
}
fetchArgs := []string{"-c", "credential.helper=", "fetch", "--force"}
fetchArgs := []string{"fetch", "--force"}
for _, filter := range *gitFetchFilters {
fetchArgs = append(fetchArgs, "--filter="+filter)
}
Expand Down

0 comments on commit 646afc1

Please sign in to comment.