OctopusDeploy / cli

| Public | Next Generation of the Octopus CLI :octopus:
Other
35 stars 10 forks source link

Running `octopus package nuget create` shouldn't require login #389

Closed reddogaw closed 2 months ago

reddogaw commented 2 months ago

The bug

Running octopus package nuget create to generate a nuget package should not make use of any API operations. However, it currently requires that the user first login via octopus login.

This is a command that is likely to be incorporated into build scripts and build operations.

Instead you currently receive a output of the Octopus ascii art and:

To get started with the Octopus CLI, please login to your Octopus Server using:

  octopus login

Alternatively you can set the following environment variables:

  OCTOPUS_URL: The URL of your Octopus Server
  OCTOPUS_API_KEY: An API key to authenticate to the Octopus Server with

Happy deployments!

Command to reproduce

octopus package nuget create --id MyPackage.Id --version 1.0.0 --base-path ./publishoutput --out-folder ./nupkg --overwrite --no-prompt

Outcome

Expected output of nupkg file in the out-folder path, without a prompt to login.

Versions

cli: 2.1.0 Octopus Server: N/A

Links

N/A

benPearce1 commented 2 months ago

Tested this in 2.7.0 and it is not requesting a login

image