Skip to content
Latchkey

gajira-login "Login failed" / init error in CI

atlassian/gajira-login authenticates using three environment variables: JIRA_BASE_URL, JIRA_USER_EMAIL, and JIRA_API_TOKEN. A missing or wrong value makes the login step (and every later gajira step) fail.

What this error means

The gajira-login step errors with a message about a missing variable or an authentication failure, and subsequent gajira-transition or gajira-create steps also fail.

gajira-login
Run atlassian/gajira-login@v3
Error: Input required and not supplied: JIRA_API_TOKEN

Common causes

A required env var is unset

The action reads JIRA_BASE_URL, JIRA_USER_EMAIL, and JIRA_API_TOKEN from env. If a secret was not exposed, login cannot proceed.

Wrong base URL or email/token pair

A trailing slash, wrong subdomain, or a token that does not belong to the given email causes an authentication failure at login.

How to fix it

Set all three env vars from secrets

  1. Store the base URL, account email, and API token as CI secrets.
  2. Expose them as the exact env names the action expects.
  3. Run gajira-login before any other gajira step.
.github/workflows/ci.yml
- name: Login
  uses: atlassian/gajira-login@v3
  env:
    JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
    JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
    JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

Verify the base URL has no trailing slash

Use https://your-domain.atlassian.net exactly, and confirm the token was created by the same account as JIRA_USER_EMAIL.

How to prevent it

  • Keep JIRA_BASE_URL, JIRA_USER_EMAIL, and JIRA_API_TOKEN in secrets.
  • Run gajira-login first and fail the job early if it errors.
  • Match the API token to the email that owns it.

Frequently asked questions

What causes "gajira-login "Login failed""?
The action reads JIRA_BASE_URL, JIRA_USER_EMAIL, and JIRA_API_TOKEN from env. If a secret was not exposed, login cannot proceed.
How do I fix gajira-login "Login failed"?
Set all three env vars from secrets

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card