jira auth login¶
- Usage:
jira auth login [flags]
Configure a Jira profile and store its credential. The token type — classic or scoped (granular) — is detected automatically: verification tries the site first, and on rejection re-checks the Atlassian gateway, persisting the discovered cloudId when the token turns out to be scoped. Nothing extra to pass.
With --backend env nothing is stored: the profile reads its token from the JIRA_TOKEN_<PROFILE> environment variable at run time (for example JIRA_TOKEN_DEFAULT), which suits hosts without an OS keyring — WSL, headless Linux, containers — and per-process secret injectors such as op run. The login verifies the variable's token when it is set and only warns when it is not.
Input¶
--credential-env <VAR>¶
Read the credential from a named environment variable [example: JIRA_API_TOKEN]
--json-input <FILE>¶
Read auth profile metadata from JSON file
Accepts a file.
--secret-stdin¶
Read credential from stdin
Configuration¶
--base-url <URL>¶
Jira base URL
--email <EMAIL>¶
Jira Cloud account email
--profile-name <NAME>¶
Profile name to configure
Default: default
1Password¶
--item <NAME>¶
1Password item name
--onepassword-account <ACCOUNT>¶
1Password desktop app account name
--vault <VAULT>¶
1Password vault name
Connection¶
--skip-verify¶
Store the credential without verifying it against /myself first
Options¶
--backend <BACKEND>¶
Secret backend for the credential
Allowed values:
keyring— OS keychain (default)1password— 1Password CLIenv— JIRA_TOKEN_* env var
Output fields¶
With --output json, the response envelope's data object carries these fields. Run jira agent schema for the full machine-readable schema.
| Field | Type | Description |
|---|---|---|
account_id |
string | |
auth_type |
string | |
boards_cached |
integer | |
cloud_id |
string | |
credential_env |
string | |
display_name |
string | |
onepassword_account |
string | |
profile |
string | |
scoped |
boolean | |
secret_backend |
string | |
skip_verify |
boolean | |
stored_secret |
boolean | |
token_type |
string | |
verified |
boolean |
Examples¶
jira auth login --profile-name work --base-url https://acme.atlassian.net --email me@example.com # (1)!
jira auth login --no-input --profile-name ci --base-url https://acme.atlassian.net --email ci@example.com --credential-env JIRA_API_TOKEN # (2)!
printf '%s' "$TOKEN" | jira auth login --no-input --profile-name work --base-url https://acme.atlassian.net --email me@example.com --secret-stdin # (3)!
- Configure a profile interactively (prompts for token)
- Headless login reading the token from an environment variable
- Headless login reading the token from stdin (classic or scoped — auto-detected)