From 6c6ac3017f4ee76d94b798d058204c5192908ef0 Mon Sep 17 00:00:00 2001 From: Randell Callahan Date: Tue, 27 Jun 2023 10:30:51 -0600 Subject: [PATCH] Set the ssl cert after repo creation and modify the repo's config --- enterprise/cmd/executor/internal/worker/command/kubernetes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enterprise/cmd/executor/internal/worker/command/kubernetes.go b/enterprise/cmd/executor/internal/worker/command/kubernetes.go index a78873dbb2fc..7c49334da3fc 100644 --- a/enterprise/cmd/executor/internal/worker/command/kubernetes.go +++ b/enterprise/cmd/executor/internal/worker/command/kubernetes.go @@ -564,14 +564,14 @@ func NewKubernetesSingleJob( sslCAInfo := "" if options.GitCACert != "" { - sslCAInfo = fmt.Sprintf("git config --global http.sslCAInfo %s; ", options.GitCACert) + sslCAInfo = fmt.Sprintf("git config --local http.sslCAInfo %s; ", options.GitCACert) } setupArgs := []string{ "set -e; " + fmt.Sprintf("mkdir -p %s; ", repoDir) + - sslCAInfo + fmt.Sprintf("git -C %s init; ", repoDir) + + sslCAInfo + fmt.Sprintf("git -C %s remote add origin %s; ", repoDir, repoOptions.CloneURL) + fmt.Sprintf("git -C %s config --local gc.auto 0; ", repoDir) + fmt.Sprintf("git -C %s "+