Skip to content
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

osc start-build doesn't work under http(s) proxy #3395

Closed
nak3 opened this issue Jun 23, 2015 · 4 comments · Fixed by #3401
Closed

osc start-build doesn't work under http(s) proxy #3395

nak3 opened this issue Jun 23, 2015 · 4 comments · Fixed by #3401
Assignees

Comments

@nak3
Copy link
Member

nak3 commented Jun 23, 2015

git clone executed here git.go#L80 doesn't load http(s) proxy setting.

git clone under the proxy needs proxy setting by running git config --global http.proxy http://proxy.example.com:8080 before git clone

@nak3
Copy link
Member Author

nak3 commented Jun 23, 2015

git clone under the proxy needs proxy setting by running git config --global http.proxy http://proxy.example.com:8080 before git clone

So, it seems that setting env in sourceStrategy doesn't work.

            "sourceStrategy": {
                "from": {
                    "kind": "DockerImage",
                    "name": "registry.access.redhat.com/openshift3_beta/ruby-20-rhel7:latest"
                },
                "env": [
                    {
                        "name": "HTTP_PROXY",
                        "value": "http://localhost:3128"
                    },
                    {
                        "name": "HTTPS_PROXY",
                        "value": "http://localhost:3128"
                    }
                ],
                "incremental": true
            }

@bparees
Copy link
Contributor

bparees commented Jun 23, 2015

as mentioned in the email thread, looks like this needs to be lower case:
https://stackoverflow.com/questions/128035/how-do-i-pull-from-a-git-repository-through-an-http-proxy

@bparees bparees self-assigned this Jun 23, 2015
@bparees
Copy link
Contributor

bparees commented Jun 23, 2015

actually that may not fix it since the env variable is not available in the container performing the clone operation.

@bparees
Copy link
Contributor

bparees commented Jun 23, 2015

@mfojtik @soltysh fyi. we might need to add HTTP* and http* to the whitelist of env variables we allow to be set on the builder pod:

https://github.com/openshift/origin/blob/master/pkg/build/controller/strategy/util.go#L20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants