{"record":{"id":"7dfce423f78705f9","repo":"windmill-labs/windmill","slug":"git-ssh-identity-expects-an-array-of-windmill-vari","errorCode":null,"errorMessage":"git_ssh_identity expects an array of windmill variables (or secrets) containing ssh IDs","messagePattern":"git_ssh_identity expects an array of windmill variables \\(or secrets\\) containing ssh IDs","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/parsers/windmill-parser-yaml/src/lib.rs","lineNumber":605,"sourceCode":"                Yaml::String(key) if key == \"delegate_to_git_repo\" => {} // Skip this because it was already parsed before\n                Yaml::String(key) => logs.push_str(&format!(\"\\nUnknown field `{}`. Ignoring\", key)),\n                _ => (),\n            }\n        }\n    }\n\n    let mut out_str = String::new();\n    let mut emitter = YamlEmitter::new(&mut out_str);\n\n    for i in 1..docs.len() {\n        emitter.dump(&docs[i])?;\n    }\n    Ok((logs, Some(ret), out_str))\n}\n\nfn extract_ssh_identity(value: &Yaml, ret: &mut Vec<String>) -> anyhow::Result<()> {\n    let Yaml::Array(indentities) = value else {\n        return Err(anyhow!(\n            \"git_ssh_identity expects an array of windmill variables (or secrets) containing ssh IDs\"\n        ));\n    };\n\n    for r in indentities {\n        let Yaml::String(file_name) = r else {\n            return Err(anyhow!(\n                \"Git ssh identity file must be a string path to a Windmill variable/secret\"\n            ));\n        };\n\n        ret.push(file_name.clone());\n    }\n    Ok(())\n}\n\nfn extract_delegate_to_git_repo_details(value: &Yaml) -> Option<DelegateToGitRepoDetails> {\n    if let Yaml::Hash(v) = value {","sourceCodeStart":587,"sourceCodeEnd":623,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/parsers/windmill-parser-yaml/src/lib.rs#L587-L623","documentation":"extract_ssh_identity throws this when the `git_ssh_identity` field in an ansible playbook requirement YAML is not a YAML array. The field is expected to be a list of strings, each naming a Windmill variable (or secret) that holds an SSH identity file path used for git authentication. A scalar or map value fails the `Yaml::Array` match and aborts parsing.","triggerScenarios":"parse_ansible_reqs or parse_delegate_to_git_repo calls extract_ssh_identity with a `git_ssh_identity` value that is a single string, map, or null rather than a sequence of strings.","commonSituations":"Specifying a single identity without list syntax (`git_ssh_identity: u$username_var` instead of a `- u$username_var` item); confusing this field with `vault_password` which does take a bare string; YAML anchors resolving to a scalar.","solutions":["Wrap the identity reference(s) in a YAML list, even for a single entry","Each list item must be a string path to a Windmill variable/secret (e.g. `- u$username_var`)","Verify indentation places the string(s) as list items under git_ssh_identity","If you intended one file path like vault_password, remember this field is always an array"],"exampleFix":"# before\ngit_ssh_identity: u$my_ssh_key_var\n\n# after\ngit_ssh_identity:\n  - u$my_ssh_key_var","handlingStrategy":"validation","validationCode":"fn validate_git_ssh_identity(value: &serde_yaml::Value) -> Result<(), String> {\n    match value.get(\"git_ssh_identity\") {\n        None => Ok(()),\n        Some(v) => match v {\n            serde_yaml::Value::Sequence(items) if items.iter().all(|i| i.is_string()) => Ok(()),\n            other => Err(format!(\"git_ssh_identity must be a list of strings, got: {:?}\", other)),\n        },\n    }\n}","typeGuard":"fn is_string_array(v: &Yaml) -> bool {\n    matches!(v, Yaml::Array(items) if items.iter().all(|i| matches!(i, Yaml::String(_))))\n}","tryCatchPattern":null,"preventionTips":["Always use list syntax for git_ssh_identity, even for one identity","Reference Windmill variables/secrets by their string path (e.g. u$var)","Quote entries that YAML might misparse as non-strings"],"tags":["yaml","ansible","ssh","parser"],"backgroundTag":"yaml-schema-validation","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}