{"record":{"id":"34b51d8dbcf47a4e","repo":"warpdotdev/warp","slug":"all-private-repositories-in-an-environment-must-be","errorCode":null,"errorMessage":"All private repositories in an environment must belong to the same owner. Found multiple owners: {}.\\nIf you need support for private repos from multiple owners, please submit a GitHub issue.","messagePattern":"All private repositories in an environment must belong to the same owner\\. Found multiple owners: (.+?)\\.\\\\nIf you need support for private repos from multiple owners, please submit a GitHub issue\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/environment.rs","lineNumber":587,"sourceCode":"                                    private_repo_owners.insert(status.owner.clone());\n                                } else {\n                                    has_public_auth_gaps = true;\n                                }\n                            }\n                            UserRepoAuthStatusEnum::UserNotConnectedToGithub => {\n                                eprintln!(\"User not connected to GitHub\");\n                                has_blocking_private_issues = true;\n                                break;\n                            }\n                        }\n                    }\n\n                    // Check that all private repos have the same owner\n                    if private_repo_owners.len() > 1 {\n                        let owners_str = private_repo_owners.into_iter().collect::<Vec<_>>().join(\", \");\n                        ctx.terminate_app(\n                            warpui::platform::TerminationMode::ForceTerminate,\n                            Some(Err(anyhow::anyhow!(\n                                \"All private repositories in an environment must belong to the same owner. Found multiple owners: {}.\\nIf you need support for private repos from multiple owners, please submit a GitHub issue.\",\n                                owners_str\n                            ))),\n                        );\n                        return;\n                    }\n\n                    if !has_blocking_private_issues {\n                        // No blocking issues with private repos.\n                        // Public repos without auth can proceed with warnings.\n                        if has_public_auth_gaps {\n                            for status in &response.statuses {\n                                if status.is_public\n                                    && matches!(\n                                        status.status,\n                                        UserRepoAuthStatusEnum::NoInstallationOrAccessForRepo\n                                    )\n                                {","sourceCodeStart":569,"sourceCodeEnd":605,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/environment.rs#L569-L605","documentation":"Thrown during the auth check in auth_repos_then_execute when more than one distinct owner appears among private repositories in a single environment create/update. The server-side constraint (enforced client-side here) is that all private repos attached to one environment must share a single owner; the owners are collected from statuses with is_public == false and the combined list is printed in the error. The message explicitly points to GitHub issues for multi-owner support.","triggerScenarios":"`warp environment create --repo orgA/private-one --repo orgB/private-two` (or mixing a private user repo with a private org repo) where both private repos pass auth — private_repo_owners ends with 2+ entries and the command force-terminates before creating anything.","commonSituations":"Merging tooling from a personal account and an employer org into one environment; aggregating private repos from two different organizations; refactoring an existing multi-owner environment during update (adding a repo from another owner).","solutions":["Split the environments so each contains private repos from only one owner","Drop the extra-owner private repos from the command and add them to a second environment","Use public repos where possible — public repos do not count toward the single-owner constraint (they only produce warnings)","If you genuinely need multi-owner private repos, upvote/file the GitHub issue referenced in the error message"],"exampleFix":"# before\nwarp environment create --name dev --repo orgA/private-one --repo orgB/private-two\n\n# after\nwarp environment create --name dev-a --repo orgA/private-one\nwarp environment create --name dev-b --repo orgB/private-two","handlingStrategy":"validation","validationCode":"// Rust: pre-validate single-owner constraint for private repos before create\nfn check_single_private_owner(repos: &[(String, String)], is_private: impl Fn(&str, &str) -> bool) -> Result<(), String> {\n    let mut owners = std::collections::HashSet::new();\n    for (o, r) in repos {\n        if is_private(o, r) { owners.insert(o.clone()); }\n    }\n    match owners.len() {\n        0 | 1 => Ok(()),\n        _ => Err(format!(\"multiple private owners: {}\", owners.into_iter().collect::<Vec<_>>().join(\", \"))),\n    }\n}","typeGuard":"fn all_private_repos_same_owner(repos: &[GithubRepo], owners: impl Fn(&GithubRepo) -> bool) -> bool {\n    let distinct: HashSet<_> = repos.iter().map(owners).collect();\n    distinct.len() <= 1\n}","tryCatchPattern":null,"preventionTips":["Group private repos by owner — one environment per owner","Keep public repos separate in planning; they never trigger this constraint","Audit existing environments before updates that add cross-owner private repos","Automate the owner-set check in wrapper scripts around create/update"],"tags":["rust","github","business-rule","private-repos","create"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}