{"record":{"id":"2aa1dbbfa237ab1c","repo":"nikivdev/code","slug":"repo-not-found-under-use-owner-repo-or-ru","errorCode":null,"errorMessage":"repo '{}' not found under {}. Use owner/repo or run: f repos clone <url>","messagePattern":"repo '(.+?)' not found under (.+?)\\. Use owner/repo or run: f repos clone <url>","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/deps.rs","lineNumber":1321,"sourceCode":"    let root_entries =\n        std::fs::read_dir(root).with_context(|| format!(\"failed to read {}\", root.display()))?;\n\n    for owner_entry in root_entries.flatten() {\n        if !owner_entry.file_type().map(|t| t.is_dir()).unwrap_or(false) {\n            continue;\n        }\n        let owner = owner_entry.file_name().to_string_lossy().to_string();\n        let repo_path = owner_entry.path().join(name);\n        if repo_path.is_dir() {\n            matches.push(repos::RepoRef {\n                owner,\n                repo: name.to_string(),\n            });\n        }\n    }\n\n    if matches.is_empty() {\n        bail!(\n            \"repo '{}' not found under {}. Use owner/repo or run: f repos clone <url>\",\n            name,\n            root.display()\n        );\n    }\n\n    if matches.len() > 1 {\n        let options = matches\n            .iter()\n            .map(|repo| format!(\"{}/{}\", repo.owner, repo.repo))\n            .collect::<Vec<_>>()\n            .join(\", \");\n        bail!(\n            \"multiple matches for '{}': {}. Use owner/repo.\",\n            name,\n            options\n        );\n    }","sourceCodeStart":1303,"sourceCodeEnd":1339,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deps.rs#L1303-L1339","documentation":"Raised when resolving a short repo `name` against locally cloned repos under the repos root (src/deps.rs:1321) finds zero matches. The tool requires either an `owner/repo` qualifier or a prior local clone; it refuses to guess. The message tells you the root it searched and the two remedies.","triggerScenarios":"Passing a bare name (e.g. `foo`) to a repo-targeting command when no directory under the repos root matches that name — the repo was never cloned, was cloned under a different name, or lives under a different root directory.","commonSituations":"Typos in the repo name, cloning with a URL that produced a different directory name, a moved/changed repos root in config, or expecting the tool to fetch remote repos it has never cloned locally.","solutions":["Use the fully qualified form: `owner/repo` instead of the bare name","Clone first: `f repos clone <url>`, then retry with the local name","List what is actually under the printed root to find the correct name","Check config for a changed repos root path"],"exampleFix":"// before\nf deps open foo\nerror: repo 'foo' not found under ~/.f/repos ...\n// after\nf repos clone https://github.com/acme/foo.git\nf deps open acme/foo","handlingStrategy":"validation","validationCode":"let repos_root = Path::new(\"~/.f/repos\");\nlet short = name.rsplit('/').next().unwrap();\nlet exists = std::fs::read_dir(repos_root)\n    .map(|rd| rd.filter_map(|e| e.ok())\n        .any(|e| e.file_name().to_string_lossy() == short))\n    .unwrap_or(false);\nif !exists && !name.contains('/') {\n    anyhow::bail!(\"clone first or use owner/repo form for '{name}'\");\n}","typeGuard":"fn is_qualified_repo(name: &str) -> bool {\n    let parts: Vec<&str> = name.split('/').collect();\n    parts.len() == 2 && parts.iter().all(|p| !p.is_empty())\n}","tryCatchPattern":"match resolve_repo(name) {\n    Err(e) if e.to_string().contains(\"not found under\") => {\n        eprintln!(\"{e:#}\");\n        eprintln!(\"hint: f repos clone <url>, then use owner/repo\");\n    }\n    other => other?,\n}","preventionTips":["Always use owner/repo form in scripts and aliases","Clone via `f repos clone <url>` so names resolve locally","Periodically list the repos root to keep names known","Watch for moved/changed repos root in config"],"tags":["resolution","repo-lookup","cli"],"backgroundTag":"resource-not-found","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}