Skip to content

Go: Don't modify global git config for the registry proxy certificate - #22874

Closed
jketema wants to merge 1 commit into
mainfrom
go/proxy-git-cainfo-env
Closed

jketema wants to merge 1 commit into
mainfrom
go/proxy-git-cainfo-env

Conversation

@jketema

@jketema jketema commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

The Go extractor currently runs git config --global http.sslCAInfo <temp cert> when private git_source registries are configured. This persists beyond the job: on non-ephemeral self-hosted runners, later jobs find git pointing at a temporary certificate that no longer exists.

This PR removes that call and instead passes the certificate via GIT_SSL_CAINFO in the environment applied to go commands (next to SSL_CERT_FILE), so it only affects the git processes spawned by go.

Caveat: git invoked outside ApplyProxyEnvVars no longer gets the certificate; I haven't found such callers.

Adds a unit test that getEnvVars returns both variables. go test ./registries passes.

@github-actions github-actions Bot added the Go label Oct 22, 2026
Document the proxy certificate behavior without referring to the previous global Git configuration, and add a Go extractor change note.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jketema jketema closed this Oct 26, 2026
@jketema
jketema force-pushed the go/proxy-git-cainfo-env branch from 2bdc7bc to c9a15bd Compare October 26, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant