{"record":{"id":"b25fcf332ec38806","repo":"jdx/mise","slug":"podman-pull-failed-stderr","errorCode":null,"errorMessage":"podman pull failed: {}: {stderr}","messagePattern":"podman pull failed: (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/oci/run.rs","lineNumber":279,"sourceCode":"/// Load the OCI layout at `image_dir` into the given engine and return the\n/// image reference that should be passed to the engine's `run` subcommand.\n///\n/// We don't rely on `podman tag` here because `podman tag` takes an image\n/// name/ID (not a transport reference), and the image name that `podman\n/// pull oci:<dir>` assigns depends on the layout's `ref.name` annotation\n/// and the podman version. Capturing the image ID printed by\n/// `podman pull --quiet` is deterministic across versions.\nfn load_image(engine: Engine, image_dir: &Path) -> Result<String> {\n    match engine {\n        Engine::Podman => {\n            let src = format!(\"oci:{}\", image_dir.display());\n            let out = Command::new(\"podman\")\n                .args([\"pull\", \"--quiet\", &src])\n                .output()\n                .wrap_err(\"running `podman pull`\")?;\n            if !out.status.success() {\n                let stderr = String::from_utf8_lossy(&out.stderr);\n                bail!(\"podman pull failed: {}: {stderr}\", out.status);\n            }\n            // `podman pull --quiet` prints just the image ID on stdout.\n            let id = String::from_utf8(out.stdout)\n                .wrap_err(\"podman pull produced non-utf8 output\")?\n                .trim()\n                .to_string();\n            if id.is_empty() {\n                bail!(\"podman pull succeeded but printed no image ID\");\n            }\n            Ok(id)\n        }\n        Engine::Docker => {\n            // Stream the layout into `docker load` as a docker-archive. Pick\n            // a per-invocation tag so concurrent `mise oci run` calls don't\n            // clobber each other — a shared `mise-oci:run` tag would\n            // otherwise race: the second load would overwrite the first\n            // image before the first container started.\n            let tag = format!(","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/oci/run.rs#L261-L297","documentation":"When the selected container engine is podman, mise loads the OCI image by running `podman pull --quiet <src>`. If the command exits non-zero, mise surfaces the exit status and the full podman stderr so the underlying pull failure (bad reference, auth, network, registry) is visible.","triggerScenarios":"`mise oci run <image>` where podman's `pull --quiet` of the source image fails: nonexistent tag, unreachable registry, missing credentials for a private registry, TLS/proxy problems, or podman daemon/storage errors.","commonSituations":"Typo in image reference or tag; private registry requiring `podman login`; corporate proxy blocking registry access; offline CI; registry rate limits.","solutions":["Run `podman pull <src>` manually to see the full error","Log in to the registry: `podman login <registry>`","Fix the image reference (registry/namespace/tag) in the mise invocation","Check network/proxy/TLS settings between host and registry"],"exampleFix":"// before\nmise oci run ghcr.io/my-org/my-image:does-not-exist\n// after\npodman pull ghcr.io/my-org/my-image:does-not-exist  # diagnose\nmise oci run ghcr.io/my-org/my-image:v1.2.3","handlingStrategy":"retry","validationCode":"podman pull \"$IMAGE\" || { echo \"pull failed for $IMAGE\"; exit 1; }","typeGuard":null,"tryCatchPattern":"try { execSync(`mise oci run ${image}`) } catch (e) { const stderr = e.stderr?.toString() ?? ''; if (stderr.includes('authentication required')) { execSync(`podman login ${registry}`); /* retry once */ } else throw e }","preventionTips":["podman login to private registries before running mise oci run","Verify image tags exist with `podman search` or the registry UI","Check proxy/TLS config (HTTP_PROXY, registries.conf) in restricted networks"],"tags":["oci","podman","network","image-pull","registry"],"backgroundTag":"command-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}