Command reference
stax login
Authenticate with an OCI registry
Authenticate with an OCI-compatible registry. Credentials are stored using the same credential store as Docker or ORAS, so existing Docker logins may work automatically.
Usage
# Interactive login (prompts for username and password)
stax login ghcr.io
# Non-interactive login (for CI/CD)
stax login --username user --password-stdin ghcr.io
# With a personal access token
echo $GITHUB_TOKEN | stax login --username USERNAME --password-stdin ghcr.ioOptions
| Flag | Description |
|---|---|
--username <user> | Registry username |
--password-stdin | Read password from stdin (for non-interactive use) |
Credential storage
stax uses the same credential store as Docker and ORAS:
- macOS — Keychain Access
- Linux —
~/.docker/config.jsonor a configured credential helper - Windows — Windows Credential Manager
If you're already authenticated with Docker for the same registry, stax will use those credentials automatically.
Registry-specific setup
GitHub Container Registry (ghcr.io)
Create a personal access token with read:packages and write:packages scopes:
echo $GITHUB_TOKEN | stax login --username YOUR_USERNAME --password-stdin ghcr.ioDocker Hub
stax login docker.ioPrivate registries
Any OCI-compatible registry works:
stax login registry.example.comCI/CD usage
In CI environments, pass credentials via environment variables and stdin:
# GitHub Actions
- name: Login to registry
run: echo "${{ secrets.REGISTRY_TOKEN }}" | stax login --username ${{ github.actor }} --password-stdin ghcr.io