nais auth status

nais auth status [flags]

Check both login types without starting a login flow. Nais uses the current API credentials, refreshing the session if necessary. Google Cloud checks the active gcloud account and the presence of Application Default Credentials; token validity is not verified. Missing credentials or an uninstalled gcloud are reported normally; other check failures return an error after both statuses are displayed. Use –output json for stable status values (authenticated, not_logged_in, not_installed, check_failed), null accounts when unavailable, and optional diagnostic details.

Options

-o, --output
Format output (table or json).

Inherited options

--config
Specify the PATH to the configuration file.
--confirm-login
Ask for confirmation before starting required login flows. Interactive terminals only.
-e, --environment
Select or filter by Nais ENVIRONMENT, for example dev-gcp or prod-gcp. Overrides the environment configured with nais defaults set environment.
--no-colors
Disable colors in the output.
-t, --team
Select the Nais TEAM that owns the resources. Overrides the team configured with nais defaults set team.
-v, --verbose
Set verbosity level. Use -v for verbose, -vv for debug, -vvv for trace.

Examples

# Show the status of both login types without logging in.
$ nais auth status 

# Get machine-readable status for both providers.
$ nais auth status --output json