{"record":{"id":"247f9b1b18659d30","repo":"kovidgoyal/kitty","slug":"no-secret-backend-specified-for-s","errorCode":null,"errorMessage":"No secret backend specified for: %s","messagePattern":"No secret backend specified for: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/ssh/config.go","lineNumber":42,"sourceCode":"\nvar _ = fmt.Print\n\nfunc resolve_secret(key, val string) (string, error) {\n\tv := strings.TrimSpace(val)\n\tif v == \"\" {\n\t\treturn \"\", nil\n\t}\n\tif b, s, ok := strings.Cut(v, \":\"); ok {\n\t\tb = strings.ToLower(strings.TrimSpace(b))\n\t\ts = strings.TrimSpace(s)\n\t\tswitch b {\n\t\tcase \"text\":\n\t\t\treturn s, nil\n\t\tdefault:\n\t\t\treturn \"\", fmt.Errorf(\"Unsupported secret backend %s for %s. Supported backends: text\", b, key)\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"No secret backend specified for: %s\", key)\n}\n\nfunc resolve_secrets(c *Config, only_syntax bool) error {\n\t_ = only_syntax // this will be useful when using backends that require user interaction\n\tif r, err := resolve_secret(\"password\", c.Password); err != nil {\n\t\treturn err\n\t} else {\n\t\tc.Password = r\n\t}\n\tif r, err := resolve_secret(\"totp_secret\", c.Totp_secret); err != nil {\n\t\treturn err\n\t} else {\n\t\tc.Totp_secret = r\n\t}\n\treturn nil\n}\n\ntype EnvInstruction struct {","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/ssh/config.go#L24-L60","documentation":"resolve_secret requires secret values to carry a backend prefix (backend:value). If the value has no separator, no backend can be determined and this error names the offending key (password, etc.).","triggerScenarios":"Setting password: mypass without the text: prefix in the ssh kitten config.","commonSituations":"Migrating from older configs or other ssh wrappers that accepted bare passwords.","solutions":["Prefix the value with the backend: password: text:mypass","Check every secret-typed key in the config (password, passphrase, etc.) for the prefix"],"exampleFix":"// before\npassword: \"mypass\"\n// after\npassword: \"text:mypass\"","handlingStrategy":"validation","validationCode":"if !strings.Contains(value, \":\") { /* reject: missing backend prefix */ }","typeGuard":"func hasBackendPrefix(v string) bool { return strings.Contains(v, \":\") }","tryCatchPattern":null,"preventionTips":["Always prefix secrets with text:","Validate config in CI before deploying"],"tags":["config","secrets","validation","ssh"],"backgroundTag":"missing-secret-backend","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}