{"record":{"id":"1512ca5f1b726823","repo":"gastownhall/beads","slug":"github-repo-not-configured-set-github-repo-or-git","errorCode":null,"errorMessage":"GitHub repo not configured (set github.repo or GITHUB_REPO)","messagePattern":"GitHub repo not configured \\(set github\\.repo or GITHUB_REPO\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/github/tracker.go","lineNumber":69,"sourceCode":"\trepo := t.getConfig(ctx, \"github.repo\", \"GITHUB_REPO\")\n\n\t// Try combined owner/repo format: \"owner/repo\"\n\tif owner == \"\" || repo == \"\" {\n\t\townerRepo := t.getConfig(ctx, \"github.repository\", \"GITHUB_REPOSITORY\")\n\t\tif ownerRepo != \"\" {\n\t\t\tparts := strings.SplitN(ownerRepo, \"/\", 2)\n\t\t\tif len(parts) == 2 {\n\t\t\t\towner = parts[0]\n\t\t\t\trepo = parts[1]\n\t\t\t}\n\t\t}\n\t}\n\n\tif owner == \"\" {\n\t\treturn fmt.Errorf(\"GitHub owner not configured (set github.owner or GITHUB_OWNER)\")\n\t}\n\tif repo == \"\" {\n\t\treturn fmt.Errorf(\"GitHub repo not configured (set github.repo or GITHUB_REPO)\")\n\t}\n\n\tt.client = NewClient(token, owner, repo)\n\n\t// Allow custom base URL for GitHub Enterprise\n\tbaseURL := t.getConfig(ctx, \"github.url\", \"GITHUB_API_URL\")\n\tif baseURL != \"\" {\n\t\tt.client = t.client.WithBaseURL(baseURL)\n\t}\n\n\tt.config = DefaultMappingConfig()\n\treturn nil\n}\n\nfunc (t *Tracker) Validate() error {\n\tif t.client == nil {\n\t\treturn fmt.Errorf(\"GitHub tracker not initialized\")\n\t}","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/github/tracker.go#L51-L87","documentation":"Tracker.Init requires a GitHub repository name to construct its API client. The repo is read from the tracker config key github.repo or the GITHUB_REPO environment variable; when both are empty, Init fails with this message so the user knows exactly which setting to add.","triggerScenarios":"Calling tracker.Init (or any flow that initializes the GitHub tracker) on a machine/config where neither the github.repo config value nor the GITHUB_REPO env var is set (owner may be set; this error is specifically about repo).","commonSituations":"Fresh checkout without a .env, running in CI where GITHUB_REPO is not exported, switching trackers (e.g. from bd/local to GitHub) without configuring repo coordinates.","solutions":["Set the environment variable: export GITHUB_REPO=\"my-repo\".","Or set it in the tracker config: `bd config set github.repo my-repo` (or the equivalent config file entry).","Also verify github.owner / GITHUB_OWNER is set, since owner is checked first.","Re-run the initializing command after setting the value."],"exampleFix":"// before\n// no config\n// after (shell)\nexport GITHUB_OWNER=\"my-org\"\nexport GITHUB_REPO=\"my-repo\"","handlingStrategy":"validation","validationCode":"repo := os.Getenv(\"GITHUB_REPO\")\nif repo == \"\" { repo = cfg.Get(\"github.repo\") }\nif repo == \"\" { return errors.New(\"set github.repo or GITHUB_REPO before initializing the GitHub tracker\") }","typeGuard":null,"tryCatchPattern":"if err := t.Init(ctx); err != nil {\n    if strings.Contains(err.Error(), \"GitHub repo not configured\") { log.Fatal(\"set GITHUB_REPO env var or github.repo config\") }\n    return err\n}","preventionTips":["Set GITHUB_OWNER/GITHUB_REPO in your shell profile or CI environment.","Check configuration at startup, before any tracker operation.","Use `bd doctor` or equivalent to verify tracker configuration."],"tags":["github","configuration","missing-env-var"],"backgroundTag":"missing-env-var","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}