How to configure proxy details in bamboo while downloading code from bitbucket alone ?
Asked by poovaraj:

I have linked bitbucket repository to bamboo and I have triggered job from bamboo. Bamboo is unable to download code from bitbucket becuase proxy is not enabled. So, I want to configure proxy details in bamboo while downloading code from bitbucket alone ?

Plesae let me know how to configure proxy details in bamboo while downloading code from bitbucket alone ?


Answers:
author: Charlie Misonne
body: Normally you should add the proxy settings to the Java options of Bamboo. Bamboo will load them at startup withthe parameters: -Dhttp.proxyHost -Dhttp.proxyPort -Dhttps.proxyHost -Dhttps.proxyPort -Dhttp.nonProxyHost

Do I understand correctly that you don't want to set this in the Bamboo startup parameters and you need to do this "on the fly" for a individual plans?

comments: author: poovaraj
body: Currently, I have tried individual plan but it would be better if it is possible to configure bamboo startup parameter also. This bamboo proxy setting should not impact other application because few application is running using proxy and few application is not using proxy.

I want to do this configure in bamboo remote agent.

Bamboo remote agent startup command:
> *java -Dhttp.proxyHost=196.11.101.10 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=196.11.101.10 -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=127.0.\*.\*\\\|localhost Dbamboo.agent.ignoreServerCertName=true -jar atlassian-bamboo-agent-installer-6.9.2.jar [https://bamboo-company.com/agentServer/](https://bamboo-internal.cm.astrazeneca.com/agentServer/ "https://bamboo-internal.cm.astrazeneca.com/agentServer/")*

Please confirm above comment if it is work or not ?


author: Charlie Misonne
body: Yes those are the parameters you need.

And if you are starting the bamboo agents with the wrapper script you have to add the parameters to \<bamboo-agent-install\>/conf.wrapper.conf

wrapper.java.additional.\<NUM\>= *-Dhttp.proxyHost=196.11.101.10 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=196.11.101.10 -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=127.0.\*.\*\\\|localhost*

Don't forget to apply the proxy settings to you Bamboo agents AND your Bamboo server. Bamboo server will also make connections to Bitbucket.

Do you have any issues with this setup?


author: poovaraj
body: The below command is not working but alternative method is working fine. Please let me know why is it not working below command ?

++**Not worked:**++
> *java -Dhttp.proxyHost=196.11.101.10 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=196.11.101.10 -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=127.0.\*.\*\\\|localhost Dbamboo.agent.ignoreServerCertName=true -jar atlassian-bamboo-agent-installer-6.9.2.jar [https://bamboo-company.com/agentServer/](https://bamboo-internal.cm.astrazeneca.com/agentServer/ "https://bamboo-internal.cm.astrazeneca.com/agentServer/")*

++**Worked**:++
> export https_proxy=*196.11.101.10:* *8080*
>
> export http_proxy=*196.11.101.10:* *8080*
>
> export no_proxy="'echo 127.0.{0..255}.{0..254},' 127.0.255.255"
>
> java -Dbamboo.agent.ignoreServerCertName=true -jar atlassian-bamboo-agent-installer-6.9.2.jar *[https://bamboo-company.com/agentServer/](https://bamboo-internal.cm.astrazeneca.com/agentServer/ "https://bamboo-internal.cm.astrazeneca.com/agentServer/")*


author: jira guy
body: You don't need proxy..

Make sure bitbucket and bamboo are connected through application links

You should then be able to easily select the repo you needed from the config page

comments: author: poovaraj
body: bitbucket and bamboo are already connected through application links but it is showing "Connection refushed and port number 443 blocked" message if I didn't configure proxy in system environment. I want to configure proxy in bamboo while downloading code from bitbucket instead of configuring in system variable