We have our build nodes behind a corporate firewall and allow it out via a proxy to get stuff. So we have the proxy info set in the plugin manager.
However, I'd like to use AWS machines to do some building, but of course those don't need a proxy. I can't turn the proxy completely off or the other builds will break.
Is there a way to turn off or override the globally set proxy on a specific build?
Cloning the remote Git repository
Cloning repository https://joeuser@bitbucket.org/team/app.git
> /usr/bin/git init /home/jenkins/workspace/Angular Projects/app/building-svcs-aws2 # timeout=10
Fetching upstream changes from https://joeuser@bitbucket.org/team/app.git
> /usr/bin/git --version # timeout=10
using .gitcredentials to set credentials
> /usr/bin/git config --local credential.username joeuser # timeout=10
> /usr/bin/git config --local credential.helper store --file=/tmp/git7307041699576258044.credentials # timeout=10
Setting http proxy: proxyna.server.com:8060
> /usr/bin/git -c core.askpass=true fetch --tags --progress https://joeuser@bitbucket.org/team/app.git +refs/heads/*:refs/remotes/origin/*
> /usr/bin/git config --local --remove-section credential # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://joeuser@bitbucket.org/team/app.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
You can see it injecting the proxy, I was surprised to find it get set there automatically from where it was configured in the plugins section. But if I remove the proxy setting there, the code checks out just fine.
I was going to move to ssh://
but I'll still have the problem I think with npm
, maven
, etc. ...