nikivdev/code · error
gitedit owner is required
Error message
gitedit owner is required
What it means
resolve_gitedit_owner falls back to prompting the user interactively for the gitedit owner; if the user presses Enter without typing anything, the empty input is rejected with this error. It prevents publishing into an empty/invalid owner namespace.
Source
Thrown at src/publish.rs:602
let mut input = String::new();
io::stdin().read_line(&mut input)?;
let input = input.trim();
if input.is_empty() {
return Ok(slug);
}
return Ok(input.to_string());
}
}
if opts.yes {
bail!("gitedit owner not set (use --owner or GITEDIT_OWNER)");
}
print!("gitedit owner: ");
io::stdout().flush()?;
let mut input = String::new();
io::stdin().read_line(&mut input)?;
let input = input.trim();
if input.is_empty() {
bail!("gitedit owner is required");
}
Ok(input.to_string())
}
fn gitedit_repo_override(repo_root: &Path) -> (Option<String>, Option<String>) {
let flow_path = find_flow_toml(repo_root);
let Some(flow_path) = flow_path else {
return (None, None);
};
let cfg = match config::load(&flow_path) {
Ok(cfg) => cfg,
Err(_) => return (None, None),
};
let raw = match cfg.options.gitedit_repo_full_name {
Some(value) => value,
None => return (None, None),
};
let mut parts = raw.split('/');View on GitHub (pinned to a747e741ae)
Solutions
- Type the gitedit owner (username or org) at the prompt and press Enter
- Avoid the prompt entirely with --owner <name> or GITEDIT_OWNER env var
- Ensure stdin is a TTY when running interactively; do not pipe empty input into the command
Defensive patterns
Strategy: validation
Validate before calling
if std::io::stdin().is_terminal() {
print!("gitedit owner: ");
io::stdout().flush()?;
let mut input = String::new();
io::stdin().read_line(&mut input)?;
if input.trim().is_empty() {
eprintln!("owner cannot be empty; re-run and type a value");
std::process::exit(1);
}
} Try / catch
match run(opts) {
Err(e) if e.to_string() == "gitedit owner is required" => {
eprintln!("re-run and enter a non-empty owner, or use --owner <name>");
}
other => other?,
} Prevention
- Bypass the prompt with --owner or GITEDIT_OWNER in scripts
- Check `stdin.is_terminal()` before expecting an interactive prompt to work
- Don't pipe empty input into interactive commands
When it happens
Trigger: Interactive prompt `gitedit owner:` receives an empty line (bare Enter or EOF/ctrl-D on stdin).
Common situations: User hits Enter assuming a default exists when none is shown; running in a terminal where stdin is closed (piped input), so read_line returns EOF and the input is empty; accidentally cancelling the prompt.
Related errors
- Suggested command is incomplete.
- Command '{}' is incomplete.
- Relative path cannot be empty.
- Relative path must not be absolute.
- Relative path must not contain '..'.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/41cc5471e52871d7.
Report an issue: GitHub.