Issue: Azure CLI fails to login when behind a proxy

Hi, We have upgraded to 2018.8.4 but still faicng this issue with the bug-4855. And it only works with the workaroud (adding “OctopusDisableAzureCLI” variable).

Is there any permanent fix? or is it fixed in a later version?

Hi Prav, sorry to hear you are running into issues,

What proxy are you using and what sort of authentication does it use, if any? Could you also attach the raw task logs for the deployment that’s failing, please?

Could you also take a screenshot of your web proxy settings, please? We surface that information in Configuration - Settings - Web Request Proxy


Below are the error messages:

error occurred in request., ConnectionError: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /subscriptions?api-version=2016-06-01 (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x02EFDA50>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it’,))

Extracting package ‘D:\Program Files\OctopusDeployTestEnv\OctopusServer\PackageCache*****.nupkg’ to ‘D:\Program Files\OctopusDeployTestEnv\Work***’ October 5th 2018 12:56:59 Error ERROR: Error occurred in request., ConnectionError: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url:

I have also uploaded the screenshot of the proxy setting,

Please help.

Thank you

Hi Prav,

We have merged some changes today which should fix the problem for Authentication proxies and should be released as part of 2018.9 early next week. The only real workound is to disable the Azure CLI or to set the environment variables HTTP_PROXY and HTTPS_PROXY values on the worker machine. This would usually be the octopus server for Azure steps, unless you are using workers.

Could you provide us a bit more information about your proxy, please? Which proxy are you using and does it require authentication?


Hi Shaun,

We are using our internal H&M proxy it doesnot require any authentication.

Hi Prav, thanks for sending that through,

The screenshot seems to suggest that you do not have a proxy configured or you are possibly using workers?

This link covers how to configure the web request proxy which is slightly different depending on whether you are using workers or not. If you haven’t configured workers, then use the Octopus Server manager, otherwise, you will need to use the tentacle manager to configure the proxy for individual workers.


We also have an issue currently, where octopus does not automatically set the HTTP_PROXY and HTTPS_PROXY variables based on the system proxy. This causes some problems for tools like the Azure CLI which doesn’t support using the system proxy by default. This has been addressed in 2018.8.9 and will be released in the next couple of days.

Hope the above helps,