gastownhall/beads · error
setting dolt user.email: %w %s
Error message
setting dolt user.email: %w %s
What it means
bd wraps the failure of the external command `dolt config --global --add user.email <email>` in ensureDoltIdentity (internal/doltserver/doltserver.go:1886). It fires only after setting user.name succeeded (or was attempted), and the message appends dolt's combined output to the exec error. This is the second half of seeding a Dolt committer identity from git config or the beads defaults.
Source
Thrown at internal/doltserver/doltserver.go:1886
gitName := "beads"
gitEmail := "beads@localhost"
if out, err := exec.Command("git", "config", "user.name").Output(); err == nil {
if name := strings.TrimSpace(string(out)); name != "" {
gitName = name
}
}
if out, err := exec.Command("git", "config", "user.email").Output(); err == nil {
if email := strings.TrimSpace(string(out)); email != "" {
gitEmail = email
}
}
if out, err := exec.Command("dolt", "config", "--global", "--add", "user.name", gitName).CombinedOutput(); err != nil {
return fmt.Errorf("setting dolt user.name: %w\n%s", err, out)
}
if out, err := exec.Command("dolt", "config", "--global", "--add", "user.email", gitEmail).CombinedOutput(); err != nil {
return fmt.Errorf("setting dolt user.email: %w\n%s", err, out)
}
return nil
}
// bdDoltMarker is written after a current bd process creates or acknowledges a
// local Dolt repository. Its absence in an existing .dolt/ directory indicates
// the database was created by a pre-0.56 bd version (which used embedded mode).
// Those databases are incompatible with the current server-only architecture.
const bdDoltMarker = ".bd-dolt-ok"
// MarkDoltDirCompatible writes the canonical bd compatibility marker when
// doltDir contains a local Dolt repository. It no-ops when there is no .dolt/
// directory, which lets server and repair paths call it defensively.
func MarkDoltDirCompatible(doltDir string) error {
if doltDir == "" {
return errors.New("dolt directory is required")
}View on GitHub (pinned to 71377f2769)
Solutions
- Read dolt's output appended after the wrapped error — it usually names the exact config-file problem.
- Run `dolt config --global --add user.email "you@example.com"` manually to reproduce and see the raw error.
- Check disk space/quota on $HOME (`df -h $HOME`) and free space if full.
- Set both keys explicitly beforehand (`dolt config --global --set user.name ...; dolt config --global --set user.email ...`) so bd skips auto-setup entirely.
- If the global config file is corrupt, back it up and delete ~/.dolt/config_global.json, then re-run bd.
Example fix
// before: disk full, bd auto-config fails midway $ bd ready Error: setting dolt user.email: exit status 1: write error: no space left on device // after $ df -h $HOME # free space or expand volume $ dolt config --global --set user.name "beads" $ dolt config --global --set user.email "beads@localhost" $ bd ready
Defensive patterns
Strategy: validation
Validate before calling
// Ensure disk space and a complete identity before running bd
[ "$(df --output=avail -B1 "$HOME" | tail -1)" -gt 104857600 ] || { echo "insufficient space in $HOME"; exit 1; }
dolt config --global --get user.email >/dev/null 2>&1 || dolt config --global --set user.email "$(git config user.email || echo beads@localhost)" Try / catch
// Catch and surface dolt's appended output to the operator
if err := run(); err != nil && strings.HasPrefix(err.Error(), "setting dolt user.email:") {
// err text ends with dolt's combined output; log it verbatim for diagnosis
fmt.Fprintln(os.Stderr, "dolt user.email setup failed:\n"+err.Error())
os.Exit(1)
} Prevention
- Set both user.name and user.email globally with `dolt config --global --set` ahead of time so bd skips auto-setup.
- Monitor disk quota on home volumes where bd/Dolt data lives.
- Avoid running concurrent bd/dolt processes against the same $HOME during first-run config.
- Treat user.name and user.email as a pair — if one needed seeding, seed both in the same setup step.
When it happens
Trigger: dolt global user.name was unset, bd proceeded past the user.name step, then `dolt config --global --add user.email ...` exits non-zero — typical causes: HOME became unwritable between the two calls, a concurrent process locked/rewrote the global config, disk full, or dolt binary vanished from PATH mid-run.
Common situations: Disk quota exceeded on the home volume; parallel bd/dolt processes racing on ~/.dolt/config_global.json; partially corrupted global config after the name write succeeded; CI runners cleaning $HOME mid-job.
Related errors
- setting dolt user.name: %w %s
- dolt version probe failed
- failed to load config: %w
- database config fix not applicable for Dolt backend (data is
- no active beads workspace
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/1ba87ef2bf22abc2.
Report an issue: GitHub.