Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit a3c3bd2

Browse files
[Backport 5.1] executors: Set the ssl cert after repo creation and modify the repo's config (#54313)
Modify the repo&#39;s certs instead of the global. ## Test plan Test locally. <br> Backport 3961440 from #54310 Co-authored-by: Randell Callahan <[email protected]>
1 parent 3e34ed9 commit a3c3bd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

enterprise/cmd/executor/internal/worker/command/kubernetes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,14 @@ func NewKubernetesSingleJob(
564564

565565
sslCAInfo := ""
566566
if options.GitCACert != "" {
567-
sslCAInfo = fmt.Sprintf("git config --global http.sslCAInfo %s; ", options.GitCACert)
567+
sslCAInfo = fmt.Sprintf("git config --local http.sslCAInfo %s; ", options.GitCACert)
568568
}
569569

570570
setupArgs := []string{
571571
"set -e; " +
572572
fmt.Sprintf("mkdir -p %s; ", repoDir) +
573-
sslCAInfo +
574573
fmt.Sprintf("git -C %s init; ", repoDir) +
574+
sslCAInfo +
575575
fmt.Sprintf("git -C %s remote add origin %s; ", repoDir, repoOptions.CloneURL) +
576576
fmt.Sprintf("git -C %s config --local gc.auto 0; ", repoDir) +
577577
fmt.Sprintf("git -C %s "+

0 commit comments

Comments
 (0)