-
Notifications
You must be signed in to change notification settings - Fork 599
Description
Expected Behavior
When setting the httpProxy parameter of the git-clone task, the git clone operation actually uses this configured proxy.
Actual Behavior
The git clone fails with Could not resolve host .... It seems the proxy is not used at all.
(Note that in my case a virtual host is used in the Git URL and the proxy takes care for resolution.)
The git-clone task sets environment variables HTTP_PROXY and HTTPS_PROXY.
It seems git ignores the upper-case variables. Instead git expects lower_case proxy environment variables http_proxy and https_proxy. (I only tested with HTTP_PROXY. HTTPS_PROXY might not be affected)
I tested my failing PipelineRun with this change in git-clone and it worked.
Steps to Reproduce the Problem
- Setup an environment with a git server and a proxy to connect to it.
- Configure a PipelineRun using the
git-clonetask and configure the giturl(best with a virtual host, not directly resolvable) and thehttpProxyparameter. - Run the pipeline, it should fail (if the git server is not reachable also without proxy).
You could also try again with this change in git-clone.
It should work now.
Additional Info
In the described scenario I used Credential Resolution instead of a passing .gitconfig and .git-credentials as basic-auth workspace.