{"record":{"id":"03ef59030f31828e","repo":"gastownhall/beads","slug":"jira-api-token-not-configured-run-bd-config-set-j","errorCode":null,"errorMessage":"Jira API token not configured\nRun: bd config set jira.api_token \"YOUR_TOKEN\"\nOr: export JIRA_API_TOKEN=YOUR_TOKEN","messagePattern":"Jira API token not configured\nRun: bd config set jira\\.api_token \"YOUR_TOKEN\"\nOr: export JIRA_API_TOKEN=YOUR_TOKEN","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/jira.go","lineNumber":353,"sourceCode":"\n\tctx := rootCtx\n\tjiraURL, _ := store.GetConfig(ctx, \"jira.url\")\n\n\tif jiraURL == \"\" {\n\t\treturn fmt.Errorf(\"jira.url not configured\\nRun: bd config set jira.url \\\"https://company.atlassian.net\\\"\")\n\t}\n\n\t// Check for project configuration (singular or plural).\n\tpluralProjects, _ := store.GetConfig(ctx, \"jira.projects\")\n\tsingularProject, _ := store.GetConfig(ctx, \"jira.project\")\n\tprojectKeys := tracker.ResolveProjectIDs(nil, pluralProjects, singularProject)\n\tif len(projectKeys) == 0 {\n\t\treturn fmt.Errorf(\"no Jira project configured\\nRun: bd config set jira.project \\\"PROJ\\\"\\nOr:  bd config set jira.projects \\\"PROJ1,PROJ2\\\"\")\n\t}\n\n\tapiToken, _ := store.GetConfig(ctx, \"jira.api_token\")\n\tif apiToken == \"\" && os.Getenv(\"JIRA_API_TOKEN\") == \"\" {\n\t\treturn fmt.Errorf(\"Jira API token not configured\\nRun: bd config set jira.api_token \\\"YOUR_TOKEN\\\"\\nOr: export JIRA_API_TOKEN=YOUR_TOKEN\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":335,"sourceCodeEnd":358,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/jira.go#L335-L358","documentation":"The final check in validateJiraConfig requires an API token: either the 'jira.api_token' config key or the JIRA_API_TOKEN environment variable must be non-empty. Without credentials, Jira API calls would fail authentication, so bd refuses up front with this fixed remediation message.","triggerScenarios":"Running `bd jira sync|push|pull` when both store config 'jira.api_token' is empty and env var JIRA_API_TOKEN is unset or empty.","commonSituations":"Token set in shell profile but not exported in the current shell/CI job; token stored on a teammate's machine only; expired/rotated token removed from config; secrets excluded from synced config for security.","solutions":["Export the token: export JIRA_API_TOKEN=YOUR_TOKEN","Or persist it: bd config set jira.api_token \"YOUR_TOKEN\"","Verify with bd config get jira.api_token (or echo $JIRA_API_TOKEN), then re-run; prefer the env var in CI to avoid storing secrets"],"exampleFix":"// before\n$ bd jira sync\nJira API token not configured\n// after (CI-safe)\n$ export JIRA_API_TOKEN=$ATLASSIAN_TOKEN\n$ bd jira sync","handlingStrategy":"validation","validationCode":"tok, _ := store.GetConfig(ctx, \"jira.api_token\")\nif strings.TrimSpace(tok) == \"\" && os.Getenv(\"JIRA_API_TOKEN\") == \"\" {\n    return errors.New(\"Jira API token missing: export JIRA_API_TOKEN or run bd config set jira.api_token\")\n}","typeGuard":null,"tryCatchPattern":"if err := runJiraPull(cmd, args); err != nil {\n    if strings.Contains(err.Error(), \"Jira API token not configured\") {\n        fmt.Fprintln(os.Stderr, \"Export JIRA_API_TOKEN or set jira.api_token\")\n        os.Exit(1)\n    }\n    return err\n}","preventionTips":["Export JIRA_API_TOKEN in CI job environment rather than storing in config","Source your secrets profile before running bd jira commands","Re-set the token after rotating Jira credentials","Prefer the env var in shared environments so secrets never enter the database"],"tags":["jira","configuration","authentication","api-token"],"backgroundTag":"missing-api-token","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}