CLI Auth Error: `No context set, have you authenticated to a cluster?`

Error:

When I try running $ astro auth login, I get:

No context set, have you authenticated to a cluster?

Note: There’s a known bug with CLI v0.16 where users may get this error when running $ astro version or $astro dev init. You shouldn’t have to authenticate to Astronomer to run those commands, but while a patch is released on our side follow the steps below to resolve the issue.

Fix:

To resolve this issue, you need to authenticate to Astronomer via the CLI first (and specify the “basedomain” of the cluster you’re authenticating to). Follow the guidelines below depending on what product you’re running.

Astronomer Cloud:

$ astro auth login gcp0001.us-east4.astronomer.io

Astronomer Enterprise:

$ astro auth login BASEDOMAIN

Note: Make sure to replace BASEDOMAIN with your own basedomain (e.g. astro.mycompany.com).