CLI & APICommand reference
stackblaze registry
The organization's private registry login, for deploying private images (default - status)
Usage: stackblaze registry [options] [command]
The organization's private registry login, for deploying private images
(default: status)
Options:
-h, --help Print help
Commands:
status [options] Show the saved registry login (host and user; never
the password)
login [options] <host> Save the registry login every app in the organization
pulls with (organization admins)
logout [options] Remove the registry login (organization admins)
help [command] Print this message or the help of the given
subcommand(s)registry status
Usage: stackblaze registry status [options]
Show the saved registry login (host and user; never the password)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helpExample
Show the organization's saved registry login (stackblaze registry on its own does the same). The password is never shown:
stackblaze registry statusregistry.example.com user docs-demo password setWith --json; login is null when there is none:
stackblaze registry status --json{
"login": {
"host": "registry.example.com",
"username": "docs-demo",
"passwordSet": true
}
}registry login
Usage: stackblaze registry login [options] <host>
Save the registry login every app in the organization pulls with (organization
admins)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
--json Output JSON (same as -o json) (default: false)
-u, --username <user> Registry user name (asked for when left out)
--password-stdin Read the password or access token from stdin (default:
false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print help
The password is never a flag (it would land in shell history): it is asked
for without echo, or read from stdin with --password-stdin. It is stored
encrypted and never shown again. One login per organization; saving another
replaces it. Changing the host needs the password again.
Examples:
stackblaze registry login ghcr.io -u octocat
echo "$GHCR_TOKEN" | stackblaze registry login ghcr.io -u octocat --password-stdin
stackblaze registry login docker.io -u acme --password-stdin < token.txtExample
Save the login every app in the organization uses to pull private images from your registry. Read the password or access token from a file or stdin, so it never lands in shell history:
stackblaze registry login registry.example.com -u docs-demo --password-stdin < token.txtOK Saved the registry login for registry.example.com (user docs-demo). Apps pull with it from their next start.registry logout
Usage: stackblaze registry logout [options]
Remove the registry login (organization admins)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
--json Output JSON (same as -o json) (default: false)
-y, --yes Skip confirmation prompt (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helpExample
Remove the registry login. The CLI asks first:
stackblaze registry logout
stackblaze registry statusRemove the registry login for registry.example.com? Private images from it stop pulling. [y/N]: y
OK Removed the registry login for registry.example.com
No registry login. Public images pull without one. Add one: stackblaze registry login <host> -u <user>