apkg whoami
The whoami command prints the username associated with the stored credentials for a registry. Use it to verify you are logged in before running commands that require authentication, such as publish.
Synopsis
Section titled “Synopsis”apkg whoami [--registry <URL>]Options
Section titled “Options”| Option | Description |
|---|---|
--registry <URL> | Check credentials for a specific registry instead of the default |
The --registry flag is a global option available to all commands. When provided, it checks the credentials scoped to that registry URL.
Output
Section titled “Output”If credentials exist for the resolved registry, the command prints:
Logged in as <username>If no credentials are found, the command prints an error indicating you are not logged in.
Examples
Section titled “Examples”Check who you are on the default registry:
apkg whoamiCheck a private registry:
apkg whoami --registry https://registry.internal.example.comRelated commands
Section titled “Related commands”| Command | Description |
|---|---|
login | Authenticate with the registry |
logout | Remove stored credentials |
config | Manage CLI configuration |
token | Manage long-lived API tokens |