{"record":{"id":"28144785be50572b","repo":"gastownhall/beads","slug":"no-dolt-remote-is-configured-and-bd-will-not-adop","errorCode":null,"errorMessage":"no Dolt remote is configured, and bd will not adopt one without consent.\n\n  Derived from git origin: %s\n\nThis would publish your entire issue history to that remote. If it is what you\nwant, opt in explicitly:\n\n  %-38s # adopt the derived remote and %s\n  bd dolt remote add origin <url>        # or name the remote yourself first\n\nTo never adopt implicitly, pass --no-adopt or set BD_NO_REMOTE_ADOPT=1.","messagePattern":"no Dolt remote is configured, and bd will not adopt one without consent\\.\n\n  Derived from git origin: (.+?)\n\nThis would publish your entire issue history to that remote\\. If it is what you\nwant, opt in explicitly:\n\n  %-38s # adopt the derived remote and (.+?)\n  bd dolt remote add origin <url>        # or name the remote yourself first\n\nTo never adopt implicitly, pass --no-adopt or set BD_NO_REMOTE_ADOPT=1\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/dolt_remote_adopt.go","lineNumber":124,"sourceCode":"\t\tInteractive: stdinIsTerminal && !jsonMode,\n\t}\n}\n\nfunc envNoRemoteAdopt() bool {\n\tv := strings.TrimSpace(strings.ToLower(os.Getenv(\"BD_NO_REMOTE_ADOPT\")))\n\treturn v == \"1\" || v == \"true\" || v == \"yes\"\n}\n\nfunc stdinIsTerminal() bool {\n\treturn term.IsTerminal(int(os.Stdin.Fd()))\n}\n\n// adoptionRefusedError is the message for the non-interactive refusal. It\n// names the URL that would have been adopted, because \"a remote was derived\"\n// is useless without knowing which one — the reporter's whole complaint was\n// not knowing where the upload was going.\nfunc adoptionRefusedError(remoteURL string, optIn adoptOptIn) error {\n\treturn fmt.Errorf(`no Dolt remote is configured, and bd will not adopt one without consent.\n\n  Derived from git origin: %s\n\nThis would publish your entire issue history to that remote. If it is what you\nwant, opt in explicitly:\n\n  %-38s # adopt the derived remote and %s\n  bd dolt remote add origin <url>        # or name the remote yourself first\n\nTo never adopt implicitly, pass --no-adopt or set BD_NO_REMOTE_ADOPT=1.`, remoteURL, optIn.rerun, optIn.action)\n}\n\n// applyAdoptionConsent is the gate as the push path uses it: given a derived\n// URL and a policy, either return proceed=true (everything after this may\n// write) or stop. It is separated from adoptGitOriginRemoteForPush so the\n// fail-closed behavior can be asserted without resolving a workspace — that\n// resolution mutates whatever repo the test binary runs in, which is exactly\n// what the syncAdoptGitOrigin seam comment in sync.go warns about.","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/dolt_remote_adopt.go#L106-L142","documentation":"adoptionRefusedError is returned when bd derives a candidate Dolt remote from the git origin URL but consent cannot be obtained (non-interactive context, no --yes, no explicit remote). bd refuses to silently publish the entire issue history, and the error names the derived URL plus the exact opt-in commands. It is a safety/consent guard, not a malfunction.","triggerScenarios":"Running a push-like command non-interactively (CI, piped stdin) with no Dolt remote configured while a git origin exists, and without --yes/--no-adopt/BD_NO_REMOTE_ADOPT=1; applyAdoptionConsent resolves refusal == adoptRefusedNonInteractive.","commonSituations":"First bd push in CI before configuring bd dolt remote add; a contributor with a fork whose origin points to a repo they don't intend to host issues on; scripted runs without a TTY so confirmRemoteAdoption cannot prompt.","solutions":["Run bd dolt remote add origin <url> (or your chosen name) to configure the Dolt remote explicitly","Re-run with --yes to consent to adopting the derived git origin as the Dolt remote","Pass --no-adopt or export BD_NO_REMOTE_ADOPT=1 to permanently decline implicit adoption","Verify the derived URL is where you actually want issue history published before opting in"],"exampleFix":"// before (non-interactive, fails)\nbd push\n// after\nbd dolt remote add origin https://doltremoteapi.dolthub.com/org/repo\nbd push","handlingStrategy":"try-catch","validationCode":"// pre-flight: decide consent before running non-interactively\nremoteURL := gitOriginURL()\nif remoteURL != \"\" && !doltRemoteConfigured() && !consented {\n    return fmt.Errorf(\"refusing to adopt %s without consent; use bd dolt remote add origin <url> or --yes\", remoteURL)\n}","typeGuard":"var refused *adoptionRefusedError\nif errors.As(err, &refused) { /* show derived URL + opt-in instructions */ }","tryCatchPattern":"if err := applyAdoptionConsent(...); err != nil {\n    var refused *adoptionRefusedError\n    if errors.As(err, &refused) {\n        // surface URL; retry with --yes or bd dolt remote add origin <url>\n    }\n}","preventionTips":["Configure bd dolt remote add origin <url> once per repo before automating pushes","Set BD_NO_REMOTE_ADOPT=1 in CI to make refusal deterministic","In non-interactive contexts always pass explicit consent flags (--yes/--no-adopt)"],"tags":["dolt","remote","consent","security","non-interactive"],"backgroundTag":"remote-adoption-refused","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}