{"record":{"id":"ca4f291b270e32cc","repo":"nikivdev/code","slug":"gitedit-owner-not-set-use-owner-or-gitedit-owne","errorCode":null,"errorMessage":"gitedit owner not set (use --owner or GITEDIT_OWNER)","messagePattern":"gitedit owner not set \\(use --owner or GITEDIT_OWNER\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/publish.rs","lineNumber":594,"sourceCode":"    if let Ok(owner) = std::env::var(\"USER\") {\n        let slug = sanitize_slug(&owner);\n        if !slug.is_empty() {\n            if opts.yes {\n                return Ok(slug);\n            }\n            print!(\"gitedit owner [{}]: \", slug);\n            io::stdout().flush()?;\n            let mut input = String::new();\n            io::stdin().read_line(&mut input)?;\n            let input = input.trim();\n            if input.is_empty() {\n                return Ok(slug);\n            }\n            return Ok(input.to_string());\n        }\n    }\n    if opts.yes {\n        bail!(\"gitedit owner not set (use --owner or GITEDIT_OWNER)\");\n    }\n    print!(\"gitedit owner: \");\n    io::stdout().flush()?;\n    let mut input = String::new();\n    io::stdin().read_line(&mut input)?;\n    let input = input.trim();\n    if input.is_empty() {\n        bail!(\"gitedit owner is required\");\n    }\n    Ok(input.to_string())\n}\n\nfn gitedit_repo_override(repo_root: &Path) -> (Option<String>, Option<String>) {\n    let flow_path = find_flow_toml(repo_root);\n    let Some(flow_path) = flow_path else {\n        return (None, None);\n    };\n    let cfg = match config::load(&flow_path) {","sourceCodeStart":576,"sourceCodeEnd":612,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/publish.rs#L576-L612","documentation":"resolve_gitedit_owner determines which gitedit owner namespace to publish into. It first tries config/derived values, then — when running non-interactively with --yes and no owner was supplied via --owner or GITEDIT_OWNER — it cannot prompt, so it bails with this message. This is a fail-fast guard so unattended runs never hang on stdin.","triggerScenarios":"Running `publish` with `--yes` against gitedit without `--owner`, without GITEDIT_OWNER in the environment, and with no owner derivable from the project config/URL.","commonSituations":"CI pipelines and scripted runs passing -y but forgetting the owner env var; GITEDIT_OWNER set only in a shell profile that CI does not source; typo'd env var name.","solutions":["Set GITEDIT_OWNER in the environment before running","Pass --owner <name> on the command line","Store the owner in the project's flow.toml / gitedit config so it is derived automatically","Remove --yes to allow the interactive prompt in a terminal"],"exampleFix":"// before\nci: f publish -y\n// after\nexport GITEDIT_OWNER=myuser\nci: f publish -y","handlingStrategy":"validation","validationCode":"if std::env::var(\"GITEDIT_OWNER\").map(|v| v.trim().is_empty()).unwrap_or(true) {\n    eprintln!(\"GITEDIT_OWNER must be set for non-interactive publish (use --yes)\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match run(opts) {\n    Err(e) if e.to_string().starts_with(\"gitedit owner not set\") => {\n        eprintln!(\"set GITEDIT_OWNER or pass --owner <name> for unattended runs\");\n    }\n    other => other?,\n}","preventionTips":["Export GITEDIT_OWNER in CI environment / shell profile used by automation","Always pair --yes with --owner or the env var","Store the owner in project config (flow.toml) so it's derived automatically"],"tags":["configuration","environment-variable","gitedit","non-interactive"],"backgroundTag":"missing-env-var","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}