{"record":{"id":"d4a986c9bf200e96","repo":"gastownhall/beads","slug":"no-linear-team-id-configured-run-bd-config-set-li","errorCode":null,"errorMessage":"no Linear team ID configured\nRun: bd config set linear.team_id \"TEAM_ID\"\nOr:  bd config set linear.team_ids \"TEAM_ID1,TEAM_ID2\"\nOr: export LINEAR_TEAM_ID=TEAM_ID","messagePattern":"no Linear team ID configured\nRun: bd config set linear\\.team_id \"TEAM_ID\"\nOr:  bd config set linear\\.team_ids \"TEAM_ID1,TEAM_ID2\"\nOr: export LINEAR_TEAM_ID=TEAM_ID","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/linear.go","lineNumber":1026,"sourceCode":"\n\t// Accept either OAuth credentials or API key.\n\toauthClientID, _ := getLinearConfig(ctx, \"linear.oauth_client_id\")\n\toauthClientSecret, _ := getLinearConfig(ctx, \"linear.oauth_client_secret\")\n\thasOAuth := oauthClientID != \"\" && oauthClientSecret != \"\"\n\n\tif !hasOAuth {\n\t\tapiKey, _ := getLinearConfig(ctx, \"linear.api_key\")\n\t\tif apiKey == \"\" {\n\t\t\treturn fmt.Errorf(\"Linear authentication not configured\\n\" +\n\t\t\t\t\"Options:\\n\" +\n\t\t\t\t\"  OAuth (for CI):  export LINEAR_OAUTH_CLIENT_ID=... LINEAR_OAUTH_CLIENT_SECRET=...\\n\" +\n\t\t\t\t\"  API key (devs):  export LINEAR_API_KEY=... or bd config set linear.api_key \\\"YOUR_API_KEY\\\"\")\n\t\t}\n\t}\n\n\tteamIDs := getLinearTeamIDs(ctx, cliTeams)\n\tif len(teamIDs) == 0 {\n\t\treturn fmt.Errorf(\"no Linear team ID configured\\nRun: bd config set linear.team_id \\\"TEAM_ID\\\"\\nOr:  bd config set linear.team_ids \\\"TEAM_ID1,TEAM_ID2\\\"\\nOr: export LINEAR_TEAM_ID=TEAM_ID\")\n\t}\n\n\tfor _, id := range teamIDs {\n\t\tif !isValidUUID(id) {\n\t\t\treturn fmt.Errorf(\"invalid Linear team ID (expected UUID format like '12345678-1234-1234-1234-123456789abc')\\nInvalid value: %s\", id)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// maskAPIKey returns a masked version of an API key for display.\n// Shows first 4 and last 4 characters, with dots in between.\nfunc maskAPIKey(key string) string {\n\tif len(key) <= 8 {\n\t\treturn \"****\"\n\t}\n\treturn key[:4] + \"...\" + key[len(key)-4:]","sourceCodeStart":1008,"sourceCodeEnd":1044,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/linear.go#L1008-L1044","documentation":"After authentication is validated, validateLinearConfig resolves the target Linear team IDs via getLinearTeamIDs (CLI --team flags, linear.team_id / linear.team_ids config keys, LINEAR_TEAM_ID env var). If the resolved list is empty, no sync target exists and this error with setup instructions is returned.","triggerScenarios":"Running bd linear sync/push/pull with no --team flag, no linear.team_id or linear.team_ids in bd config, and no LINEAR_TEAM_ID env var.","commonSituations":"API key configured but team never set; LINEAR_TEAM_ID set in a different shell/environment than the one running bd; config key typo (e.g. linear.teams instead of linear.team_ids).","solutions":["Run `bd config set linear.team_id \"TEAM_ID\"`","For multiple teams: `bd config set linear.team_ids \"ID1,ID2\"`","Or export LINEAR_TEAM_ID=TEAM_ID in the environment running bd","Run `bd linear teams` to list team IDs and pick the correct one"],"exampleFix":"// before\n$ bd linear sync\nError: no Linear team ID configured...\n// after\n$ bd config set linear.team_id \"12345678-1234-1234-1234-123456789abc\"\n$ bd linear sync","handlingStrategy":"validation","validationCode":"team := os.Getenv(\"LINEAR_TEAM_ID\")\nif team == \"\" {\n\treturn fmt.Errorf(\"configure linear.team_id via 'bd config set' or LINEAR_TEAM_ID before syncing\")\n}","typeGuard":null,"tryCatchPattern":"if err := runLinearSync(ctx); err != nil && strings.Contains(err.Error(), \"no Linear team ID configured\") {\n\t// run `bd linear teams`, pick a UUID, `bd config set linear.team_id`, retry\n}","preventionTips":["Configure linear.team_id right after `bd init` when setting up Linear","Use `bd linear teams` to obtain the correct UUID","Avoid relying only on env vars that may not exist in CI shells"],"tags":["configuration","linear","env-var","team"],"backgroundTag":"missing-config-key","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}