-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add proxy settings to git client #3461
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: abelhoula <[email protected]>
✅ Deploy Preview for docs-kargo-io canceled.
|
related to #3452 |
I think the correct patch would be: if b.creds != nil && b.creds.Password != "" {
cmd.Env = append(cmd.Env, "GIT_ASKPASS=/usr/local/bin/credential-helper")
cmd.Env = append(cmd.Env, fmt.Sprintf("GIT_PASSWORD=%s", b.creds.Password))
}
if httpProxy := os.Getenv("HTTP_PROXY"); httpProxy != "" {
cmd.Env = append(cmd.Env, fmt.Sprintf("http_proxy=%s", httpProxy))
}
if httpsProxy := os.Getenv("HTTPS_PROXY"); httpsProxy != ""
cmd.Env = append(cmd.Env, fmt.Sprintf("https_proxy=%s", httpsProxy))
} As you can have a proxy set without having credentials set, and you can have a HTTP proxy set without the HTTP/S proxy being set. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3461 +/- ##
==========================================
- Coverage 52.25% 52.24% -0.02%
==========================================
Files 290 290
Lines 26306 26313 +7
==========================================
Hits 13747 13747
- Misses 11809 11814 +5
- Partials 750 752 +2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: abelhoula <[email protected]>
Signed-off-by: abelhoula <[email protected]>
No description provided.