Skip to main content

CLI errors

Available

Deployed and supported. The fields and commands described here are stable within version v1alpha1.

sng writes its errors to standard error and exits with code 1. Two families: local errors (configuration, files) and errors returned by the API, displayed with their message, sometimes supplemented by an instruction. Add -v to see the method and the URL called, in parentheses.

Sign-in and session​

MessageCauseFix
not authenticated: run sng sso loginNo identity, or identity expiredsng sso login
session expired: run sng tenant use NAME (or sng sso login if identity is expired)Token expired or revokedsng sso login, then sng tenant use <tenant>
tenant session required: run sng tenant use NAMETenant command without a current tenantsng tenant use <tenant>
identity token required: run sng sso loginIdentity command run with only a session (CI that provided STNG_TENANT_TOKEN)Provide an identity (sng sso login)
waiting for the tenant default policies…Newly created tenant: its policies are not active yetNothing: the CLI waits up to six minutes
tenant policies not applied yet; retry `sng tenant use NAME` in a minuteSame, wait exceededRetry in a minute
no assume-role on tenant "NAME": ask an admin to run `sng tenant policy attach assume-role …` No policy of the tenant lets you open a session in itAsk an administrator to run the command shown

Local configuration​

MessageCauseFix
unknown cluster "…" (available: …)The cluster does not existsng config use-cluster NAME with a name from the list
tenant session required: run sng tenant use NAMENo current tenantsng tenant use NAME
parse config …Corrupted configuration fileDelete ~/.config/stackngo/config.yaml, then sng config create and sng sso login
TLS error or https requiredapi_url or STNG_API_URL in http:// to a remote hostUse https://

Manifests​

MessageCauseFix
validation failed (N issue(s))sng validate found errors, listed aboveFix each error: line
invalid manifest …Schema or cross-field rule violated; the message names the fieldSee the kind's reference page
unsupported kind …Kind that sng apply does not accept (typo, kind reserved for the platform)Check the list of kinds
Rejection that mentions metadataThe manifest specifies a location or a tenant in metadataRemove it: the tenant comes from your session
metadata : seul name est permis (… refusé)Label, annotation, tenant or any key other than name in metadataRemove it
conflictName or host already taken, or resource being deletedRename, or wait
kind/name must not change …sng kind edit: kind or metadata.name modifiedCreate the new resource, delete the old one
edit expects exactly 1 YAML document, found Nsng kind edit: several documents in the fileA single document

Deletions​

MessageCauseFix
confirmation requise : relancez avec --yes …Deletion run outside a terminal (script, CI)Add -y
opération annuléeConfirmation declined—

Permissions​

MessageCauseFix
forbidden (no policy of this tenant allows it: see sng tenant policy list)The session does not have the required IAM actionSee the action catalog and ask an administrator for the policy
authorization service unavailable: retry laterThe authorization service does not respond; no access is grantedRetry

CI (OIDC)​

MessageCauseFix
no CI OIDC token: set STNG_OIDC_TOKEN …No OIDC token exposed to the jobid_tokens (GitLab) or permissions: id-token: write (GitHub)
OIDC: tenant required: set STNG_TENANT …STNG_TENANT missingDefine it
invalid identity tokenNo trust matches the token, or several doCompare iss, aud, sub with sng tenant oidc get; set STNG_OIDC_TRUST
jeton OIDC du CI expiré …The token provided by variable expired during the jobRerun the job

Report a problem​

Include the command, the output with -v, the time (UTC) and the tenant. Never include your configuration file: it contains your tokens.