TokenNotFoundError
Cause
The CLI attempted to load an authentication token from the keyring for the target site, but no token was found. This typically occurs when you have not yet logged in, or when a previous
anaconda auth logout removed the stored credentials. In an interactive terminal, the CLI prompts with “Continue with interactive login?” before failing.Solution
Run For non-interactive environments (CI/CD pipelines, scripts), set the
anaconda auth login to authenticate and store a new token:ANACONDA_AUTH_API_KEY environment variable instead:TokenExpiredError
Cause
A token was found in the keyring, but it has expired. API keys have a configurable expiration period, and the CLI validates the token before making requests. In an interactive terminal, the CLI prompts with “Continue with interactive login?” to replace the expired token.
Solution
Run To configure the expiration period for new tokens, see the
anaconda auth login to issue and store a fresh token:api_key_expiration_days setting in Configuration.AuthenticationMissingError
Cause
A request was made to a server endpoint that requires authentication, but no credentials were attached to the request. This can happen when a command reaches an authenticated API without first loading a token from the keyring or environment. In an interactive terminal, the CLI offers to start the login flow automatically.
Solution
Log in to store credentials for the target site:Alternatively, set the
ANACONDA_AUTH_API_KEY environment variable:InvalidAuthentication
Cause
Credentials were sent with the request, but the server rejected them. This usually means the stored API key has been revoked, rotated on the server side, or was issued for a different site. In an interactive terminal, the CLI offers to start the login flow to obtain a replacement token.
Solution
Force a new login to replace the invalid credentials:If you are targeting a specific site, include the
--at flag: