{"record":{"id":"05cd2933fa3b2f82","repo":"kubernetes/kops","slug":"error-computing-key-fingerprint-for-ssh-key-v-05cd29","errorCode":null,"errorMessage":"error computing key fingerprint for SSH key: %v","messagePattern":"error computing key fingerprint for SSH key: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/dotasks/sshkey.go","lineNumber":108,"sourceCode":"\t\te.KeyFingerprint = actual.KeyFingerprint\n\t}\n\n\t// We aren't allowed two keys with the same fingerprint but different names...\n\te.Name = actual.Name\n\n\treturn actual, nil\n}\n\nfunc (e *SSHKey) Normalize(c *fi.CloudupContext) error {\n\tif e.KeyFingerprint == nil && e.PublicKey != nil {\n\t\tpublicKey, err := fi.ResourceAsString(e.PublicKey)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error reading SSH public key: %v\", err)\n\t\t}\n\n\t\tkeyFingerprint, err := pki.ComputeAWSKeyFingerprint(publicKey)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error computing key fingerprint for SSH key: %v\", err)\n\t\t}\n\t\tklog.V(2).Infof(\"Computed SSH key fingerprint as %q\", keyFingerprint)\n\t\te.KeyFingerprint = &keyFingerprint\n\t}\n\n\treturn nil\n}\n\nfunc (e *SSHKey) Run(c *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(e, c)\n}\n\nfunc (s *SSHKey) CheckChanges(a, e, changes *SSHKey) error {\n\tif a != nil {\n\t\tif changes.Name != nil {\n\t\t\treturn fi.CannotChangeField(\"Name\")\n\t\t}\n\t}","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/dotasks/sshkey.go#L90-L126","documentation":"Wraps pki.ComputeAWSKeyFingerprint failure in Normalize: the SSH public key was read but is not a parseable public key, so its MD5-style fingerprint cannot be computed for use as the DO key identifier.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/dotasks/sshkey.go:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid OpenSSH public key","Check for truncated or malformed key material in the spec","Re-run after correcting the key"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}