{"record":{"id":"ba0e3a09f50df96d","repo":"jdx/mise","slug":"bin-get-failed-for-server","errorCode":null,"errorMessage":"{bin} get failed for {server}: {}","messagePattern":"(.+?) get failed for (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/oci/auth.rs","lineNumber":261,"sourceCode":"    let mut command = Command::new(&bin);\n    command\n        .arg(\"get\")\n        .stdin(Stdio::piped())\n        .stdout(Stdio::piped())\n        .stderr(Stdio::piped());\n    prepare_noninteractive_child(&mut command);\n    let mut child = command\n        .spawn()\n        .wrap_err_with(|| format!(\"spawning {bin} (from credHelpers/credsStore)\"))?;\n    let _running_pid = RunningPidGuard::new(Some(child.id()));\n    {\n        use std::io::Write;\n        let mut stdin = child.stdin.take().expect(\"stdin piped\");\n        stdin.write_all(server.as_bytes())?;\n    }\n    let out = child.wait_with_output()?;\n    if !out.status.success() {\n        bail!(\n            \"{bin} get failed for {server}: {}\",\n            String::from_utf8_lossy(&out.stderr).trim()\n        );\n    }\n    #[derive(Deserialize)]\n    struct HelperResponse {\n        #[serde(rename = \"Username\")]\n        username: String,\n        #[serde(rename = \"Secret\")]\n        secret: String,\n    }\n    let resp: HelperResponse = serde_json::from_slice(&out.stdout)\n        .wrap_err_with(|| format!(\"parsing {bin} get output\"))?;\n    Ok(Credential {\n        username: resp.username,\n        secret: resp.secret,\n    })\n}","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/oci/auth.rs#L243-L279","documentation":"mise delegates registry credential lookup to a Docker credential helper (e.g. docker-credential-desktop, docker-credential-ghcr, docker-credential-win-credential-desktop) configured under `credHelpers`/`credsStore` in ~/.docker/config.json. It spawns `<bin> get`, writes the server name to the helper's stdin, and requires exit status 0; a non-zero exit surfaces the helper's stderr here. Spawn failures are a separate, earlier error.","triggerScenarios":"Running `mise oci push` (or registry auth) with a credsStore/credHelper whose `get` fails: expired/absent stored credentials, a locked OS keychain (macOS Keychain, Windows Credential Manager), missing server entry, or the helper erroring out for that server.","commonSituations":"Keychain locked or SSH session without keychain unlock; credentials expired since last `docker login`; helper configured by Docker Desktop but misbehaving on Linux servers; helper expects a different server string than the one mise sent (host vs host:port).","solutions":["Reproduce directly: `echo <server> | docker-credential-<name> get` — fix whatever error it prints","Re-authenticate: `docker login <server>` to refresh the stored credential","Unlock the OS keychain / ensure the session can access it (common over SSH)","Remove or correct the `credsStore`/`credHelpers` entry in ~/.docker/config.json if you don't want mise to use it"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"echo -n <server> | docker-credential-<name> get >/dev/null 2>&1 || echo \"helper will fail for <server> — docker login <server> first\"","typeGuard":null,"tryCatchPattern":"Treat this error as 'no credential available from helper': catch it, warn with the helper stderr, and fall back to the next auth source (auths entry, MISE_OCI_* env creds) or prompt — do not retry the helper unchanged.","preventionTips":["Run `docker login <server>` before `mise oci push` on each new machine/CI runner","Unlock the OS keychain when operating over SSH sessions","Test credential helpers after Docker Desktop upgrades — their config sometimes references removed helpers"],"tags":["oci","docker-credential-helper","registry","auth","subprocess"],"backgroundTag":"docker-credential-helper-error","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}