{"record":{"id":"1b4c5f3d2e7a0a41","repo":"zeroclaw-labs/zeroclaw","slug":"failed-to-clone-skills-registry-stderr","errorCode":null,"errorMessage":"failed to clone skills registry: {stderr}","messagePattern":"failed to clone skills registry: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/skills/mod.rs","lineNumber":2202,"sourceCode":"fn clone_skills_repository(target_dir: &Path, repo_url: &str) -> Result<()> {\n    if let Some(parent) = target_dir.parent() {\n        std::fs::create_dir_all(parent).with_context(|| {\n            format!(\n                \"failed to create registry parent: {}\",\n                parent.display().to_string()\n            )\n        })?;\n    }\n\n    let output = Command::new(\"git\")\n        .args([\"clone\", \"--depth\", \"1\", repo_url])\n        .arg(target_dir)\n        .output()\n        .context(\"failed to run git clone for skills registry\")?;\n\n    if !output.status.success() {\n        let stderr = String::from_utf8_lossy(&output.stderr);\n        anyhow::bail!(\"failed to clone skills registry: {stderr}\");\n    }\n\n    ::zeroclaw_log::record!(\n        INFO,\n        ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note),\n        &format!(\n            \"cloned skills registry to {}\",\n            target_dir.display().to_string()\n        )\n    );\n    Ok(())\n}\n\nfn clone_skills_registry(registry_dir: &Path, repo_url: &str) -> Result<()> {\n    clone_skills_repository(registry_dir, repo_url)?;\n    mark_skills_registry_synced(registry_dir)?;\n    Ok(())\n}","sourceCodeStart":2184,"sourceCodeEnd":2220,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/skills/mod.rs#L2184-L2220","documentation":"clone_skills_repository clones the skills registry (the default SKILLS_REGISTRY_REPO_URL or a configured registry URL) into the workspace registry directory; git exited non-zero and stderr is embedded. Unlike a failed pull — where the runtime logs a warning and falls back to the stale local copy — a failed initial clone is fatal because there is nothing to fall back to.","triggerScenarios":"First skill operation in a fresh workspace while offline; a custom configured registry URL that is wrong or unreachable; auth required for the registry repository; host outage or rate limiting.","commonSituations":"Air-gapped or proxied machines; registry_url typo in config; GitHub incidents; first-run on CI with restricted egress.","solutions":["Verify 'git clone <registry-url>' succeeds from the same machine and account","Fix or remove the configured registry URL to fall back to the default registry","Retry once network/egress is available — the clone only happens when the registry dir is missing","If you maintain a mirror, pre-seed the workspace registry directory (a git checkout including .git) so only a pull is attempted"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-seed the workspace registry during provisioning so first-run never clones:\n// provisioner side:\nif !registry_dir.exists() {\n    run!(\"git clone --depth 1 <registry-url> {registry_dir}\")?; // fail fast in setup, not at runtime\n}","typeGuard":null,"tryCatchPattern":"match ensure_skills_registry(&workspace, registry_url) {\n    Err(e) if e.to_string().starts_with(\"failed to clone skills registry\") => {\n        // registry bootstrap failed: verify configured registry_url with a manual\n        // git clone, fix network/credentials, then retry the operation\n    }\n    r => r,\n}","preventionTips":["Pre-clone the registry in environment provisioning instead of relying on first-use","Double-check the configured registry URL with a manual git clone","Remember: pull failures degrade gracefully to the local copy; only the initial clone is fatal — so keep the registry dir seeded"],"tags":["skills","registry","git","network"],"backgroundTag":"git-clone-failed","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}