gastownhall/beads · error
no ADO project configured Set via 'bd config set ado.project
Error message
no ADO project configured Set via 'bd config set ado.project <project>' Or: 'bd config set ado.projects "proj1,proj2"' Or: AZURE_DEVOPS_PROJECT env var
What it means
validateADOConfig requires at least one configured Azure DevOps project. When cfg.Projects is empty, this multi-line error lists all three supported setup channels: the single-project key, the comma-separated projects key, or the AZURE_DEVOPS_PROJECT env var.
Source
Thrown at cmd/bd/ado.go:249
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] + "****"
}
// getADOClient creates an Azure DevOps client from the current configuration.View on GitHub (pinned to 71377f2769)
Solutions
- Run `bd config set ado.project <project>` for a single project
- Run `bd config set ado.projects "proj1,proj2"` for multiple projects
- Export AZURE_DEVOPS_PROJECT=<project> in the shell/CI environment
Example fix
// before bd ado sync // error: no ADO project configured // after bd config set ado.projects "platform,web" && bd ado sync
Defensive patterns
Strategy: validation
Validate before calling
if os.Getenv("AZURE_DEVOPS_PROJECT") == "" {
if projects, _ := config.Get("ado.projects"); projects == "" {
if p, _ := config.Get("ado.project"); p == "" {
return errors.New("configure ado.project(s) or AZURE_DEVOPS_PROJECT before ADO commands")
}
}
} Try / catch
if err := bdAdoSync(); err != nil && strings.Contains(err.Error(), "no ADO project configured") {
return configureProjectsThenRetry()
} Prevention
- Configure projects immediately after PAT/org during setup
- Use ado.projects for multi-project teams
- Export AZURE_DEVOPS_PROJECT in CI
When it happens
Trigger: Running an ADO command through validateADOConfig (status, sync, push, pull) with no ado.project/ado.projects entry in bd config and no AZURE_DEVOPS_PROJECT env var.
Common situations: Org and PAT configured but projects step skipped; teams migrating from single-project to multi-project setups unsure which key to use; CI images without the project 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
- ado.org not configured: set via 'bd config set ado.org <org>
- 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/bc13832e167fdc2d.
Report an issue: GitHub.