gastownhall/beads · error
ado.org not configured: set via 'bd config set ado.org <org>
Error message
ado.org not configured: set via 'bd config set ado.org <org>' or AZURE_DEVOPS_ORG env var
What it means
validateADOConfig requires an Azure DevOps organization (or an explicit server URL) to build API endpoints. When both cfg.Org and cfg.URL are empty, this error points to `bd config set ado.org <org>` or the AZURE_DEVOPS_ORG environment variable.
Source
Thrown at cmd/bd/ado.go:246
return "AZURE_DEVOPS_ORG"
case "ado.project":
return "AZURE_DEVOPS_PROJECT"
case "ado.projects":
return "AZURE_DEVOPS_PROJECTS"
case "ado.url":
return "AZURE_DEVOPS_URL"
default:
return ""
}
}
// validateADOConfig checks that required configuration is present.
func validateADOConfig(cfg ADOConfig) error {
if cfg.PAT == "" {
return fmt.Errorf("ado.pat not configured: set via 'bd config set ado.pat <token>' or AZURE_DEVOPS_PAT env var")
}
if cfg.Org == "" && cfg.URL == "" {
return fmt.Errorf("ado.org not configured: set via 'bd config set ado.org <org>' or AZURE_DEVOPS_ORG env var")
}
if len(cfg.Projects) == 0 {
return fmt.Errorf("no ADO project configured\nSet via 'bd config set ado.project <project>'\nOr: 'bd config set ado.projects \"proj1,proj2\"'\nOr: AZURE_DEVOPS_PROJECT env var")
}
return nil
}
// maskADOToken masks a token for safe display.
// Shows only the first 4 characters to aid identification without
// revealing enough to reduce brute-force entropy.
func maskADOToken(token string) string {
if token == "" {
return "(not set)"
}
if len(token) <= 4 {
return "****"
}
return token[:4] + "****"View on GitHub (pinned to 71377f2769)
Solutions
- Run `bd config set ado.org <your-org>`
- Export AZURE_DEVOPS_ORG=<org> in the environment
- For on-prem/self-hosted servers, set the URL instead (the check accepts cfg.URL in place of org)
Example fix
// before bd ado status // error: ado.org not configured... // after bd config set ado.org my-company && bd ado status
Defensive patterns
Strategy: validation
Validate before calling
if os.Getenv("AZURE_DEVOPS_ORG") == "" {
if org, _ := config.Get("ado.org"); org == "" {
return errors.New("set ado.org or AZURE_DEVOPS_ORG before ADO commands")
}
} Try / catch
if err := bdAdoStatus(); err != nil && strings.Contains(err.Error(), "ado.org not configured") {
return configureOrgThenRetry()
} Prevention
- Complete full ADO setup (pat, org, project) in one step
- Set AZURE_DEVOPS_ORG in CI environments
- Use ado.url for on-prem servers instead of org
When it happens
Trigger: Any ADO command routed through validateADOConfig (status, sync, push, pull) where ado.org is unset in bd config, AZURE_DEVOPS_ORG is absent, and no explicit URL is configured.
Common situations: PAT configured but org skipped during setup; switching between azure-devops.com hosted orgs and on-prem servers where a URL is needed instead of an org name; CI environments lacking the org env var.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- no ADO project configured Set via 'bd config set ado.project
- ado.pat not configured: set via 'bd config set ado.pat <toke
- cannot use multiple conflict resolution flags
- invalid ADO configuration: %w
- failed to list projects: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/3c19faeb3b78b55f.
Report an issue: GitHub.