gastownhall/beads · error

no Dolt remote is configured, and bd will not adopt one with

Error message

no Dolt remote is configured, and bd will not adopt one without consent.

  Derived from git origin: %s

This would publish your entire issue history to that remote. If it is what you
want, opt in explicitly:

  %-38s # adopt the derived remote and %s
  bd dolt remote add origin <url>        # or name the remote yourself first

To never adopt implicitly, pass --no-adopt or set BD_NO_REMOTE_ADOPT=1.

What it means

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.

Source

Thrown at cmd/bd/dolt_remote_adopt.go:124

		Interactive: stdinIsTerminal && !jsonMode,
	}
}

func envNoRemoteAdopt() bool {
	v := strings.TrimSpace(strings.ToLower(os.Getenv("BD_NO_REMOTE_ADOPT")))
	return v == "1" || v == "true" || v == "yes"
}

func stdinIsTerminal() bool {
	return term.IsTerminal(int(os.Stdin.Fd()))
}

// adoptionRefusedError is the message for the non-interactive refusal. It
// names the URL that would have been adopted, because "a remote was derived"
// is useless without knowing which one — the reporter's whole complaint was
// not knowing where the upload was going.
func adoptionRefusedError(remoteURL string, optIn adoptOptIn) error {
	return fmt.Errorf(`no Dolt remote is configured, and bd will not adopt one without consent.

  Derived from git origin: %s

This would publish your entire issue history to that remote. If it is what you
want, opt in explicitly:

  %-38s # adopt the derived remote and %s
  bd dolt remote add origin <url>        # or name the remote yourself first

To never adopt implicitly, pass --no-adopt or set BD_NO_REMOTE_ADOPT=1.`, remoteURL, optIn.rerun, optIn.action)
}

// applyAdoptionConsent is the gate as the push path uses it: given a derived
// URL and a policy, either return proceed=true (everything after this may
// write) or stop. It is separated from adoptGitOriginRemoteForPush so the
// fail-closed behavior can be asserted without resolving a workspace — that
// resolution mutates whatever repo the test binary runs in, which is exactly
// what the syncAdoptGitOrigin seam comment in sync.go warns about.

View on GitHub (pinned to 71377f2769)

Solutions

  1. Run bd dolt remote add origin <url> (or your chosen name) to configure the Dolt remote explicitly
  2. Re-run with --yes to consent to adopting the derived git origin as the Dolt remote
  3. Pass --no-adopt or export BD_NO_REMOTE_ADOPT=1 to permanently decline implicit adoption
  4. Verify the derived URL is where you actually want issue history published before opting in

Example fix

// before (non-interactive, fails)
bd push
// after
bd dolt remote add origin https://doltremoteapi.dolthub.com/org/repo
bd push
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-flight: decide consent before running non-interactively
remoteURL := gitOriginURL()
if remoteURL != "" && !doltRemoteConfigured() && !consented {
    return fmt.Errorf("refusing to adopt %s without consent; use bd dolt remote add origin <url> or --yes", remoteURL)
}

Type guard

var refused *adoptionRefusedError
if errors.As(err, &refused) { /* show derived URL + opt-in instructions */ }

Try / catch

if err := applyAdoptionConsent(...); err != nil {
    var refused *adoptionRefusedError
    if errors.As(err, &refused) {
        // surface URL; retry with --yes or bd dolt remote add origin <url>
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/28144785be50572b. Report an issue: GitHub.