Docs claim HTTPS_PROXY is supported CLI-wide, but this is only true by accident: everywhere we construct &http.Client{} without overriding Transport, Go's stdlib falls back to http.DefaultTransport, which sets Proxy: http.ProxyFromEnvironment — so proxy env vars work, but only because we never override it, not because we implement it.
Docs Link: https://developer.harness.io/docs/platform/harness-cli/troubleshooting/#network-issues
The exception is the three HAR migrate registry adapters, which build an explicit http.Transport{} (to set TLSClientConfig) without setting Proxy. For an explicit Transport struct, a nil Proxy means no proxying at all — unlike the zero-value http.Client case. So harness migrate registry-to-registry copies silently ignore HTTPS_PROXY/HTTP_PROXY/NO_PROXY.
Affected files:
- modules/har/pkg/har/migrate/adapter/harbor/client.go:61
- modules/har/pkg/har/migrate/adapter/jfrog/client.go:62
- modules/har/pkg/har/migrate/adapter/nexus/client.go:40
Fix: add Proxy: http.ProxyFromEnvironment to each of these http.Transport{...} literals.
Docs claim HTTPS_PROXY is supported CLI-wide, but this is only true by accident: everywhere we construct &http.Client{} without overriding Transport, Go's stdlib falls back to http.DefaultTransport, which sets Proxy: http.ProxyFromEnvironment — so proxy env vars work, but only because we never override it, not because we implement it.
Docs Link: https://developer.harness.io/docs/platform/harness-cli/troubleshooting/#network-issues
The exception is the three HAR migrate registry adapters, which build an explicit http.Transport{} (to set TLSClientConfig) without setting Proxy. For an explicit Transport struct, a nil Proxy means no proxying at all — unlike the zero-value http.Client case. So harness migrate registry-to-registry copies silently ignore HTTPS_PROXY/HTTP_PROXY/NO_PROXY.
Affected files:
Fix: add Proxy: http.ProxyFromEnvironment to each of these http.Transport{...} literals.