Skip to content

httpProxy parameter in git-clone task not working #1319

@alxsap

Description

@alxsap

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

  1. Setup an environment with a git server and a proxy to connect to it.
  2. Configure a PipelineRun using the git-clone task and configure the git url (best with a virtual host, not directly resolvable) and the httpProxy parameter.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions