Configuration via environment variables not working in Octopus Client

I’m trying to configure octo url and api key as environment variables as described in
but got no success.
" The server url, api key, username and password can be set as the environment variables OCTOPUS_CLI_SERVER , OCTOPUS_CLI_API_KEY , OCTOPUS_CLI_USERNAME and OCTOPUS_CLI_PASSWORD respectively. Values set via command line arguments take precedence over environment variables."

After setting up the variables I’ve checked their values in a new powershell session


and tested calling octo list-deployments but got this error:

Octopus Deploy Command Line Tool, version 4.22.1

Please specify the Octopus Server URL using --server=http://your-server/
Exit code: -1

is this configuration still valid?

Hi @guilherme.ptml,

Thanks for reaching out!

It seems that feature was either broken or nonexistent in that 2yo version of Octo.exe. I can confirm that it works just fine in the latest version.

In the below screenshot you can see I was able to reproduce the error in 4.22.1, but it worked just fine in 6.2.3


So upgrading you Octo.exe should do the trick.

Hope that helps!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.