{"record":{"id":"fd7ec598e2dd53fe","repo":"dagger/dagger","slug":"volume-known-hosts-missing","errorCode":null,"errorMessage":"volume known hosts missing","messagePattern":"volume known hosts missing","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/volume_mount.go","lineNumber":227,"sourceCode":"}\n\nfunc mountSSHFSVolume(ctx context.Context, readonly bool, cfg *SSHFSVolumeConfig) (_ []ctrdmount.Mount, _ func() error, rerr error) {\n\tprivateKey, err := plaintextSecret(ctx, cfg.PrivateKey, \"volume private key\")\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tvar knownHosts []byte\n\tif cfg.KnownHosts.Self() != nil {\n\t\tknownHosts, err = plaintextSecret(ctx, cfg.KnownHosts, \"volume known hosts\")\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tif len(knownHosts) == 0 && !cfg.InsecureSkipHostKeyCheck {\n\t\t\treturn nil, nil, fmt.Errorf(\"volume known hosts empty\")\n\t\t}\n\t} else if !cfg.InsecureSkipHostKeyCheck {\n\t\treturn nil, nil, fmt.Errorf(\"volume known hosts missing\")\n\t}\n\n\tsource, port, releaseService, err := sshfsMountSource(ctx, cfg)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\trelease := releaseService\n\tdefer func() {\n\t\tif rerr != nil && release != nil {\n\t\t\t_ = runSSHFSVolumeCleanup(ctx, release)\n\t\t}\n\t}()\n\n\tworkDir, err := os.MkdirTemp(\"\", \"dagger-sshfs-\")\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"create sshfs workdir: %w\", err)\n\t}\n\trelease = joinCleanup(func() error {","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/volume_mount.go#L209-L245","documentation":"An SSHFS engine volume was configured with host key checking enabled (insecureSkipHostKeyCheck unset) and a known-hosts secret present, but the secret decrypted to empty content. sshfs would then have no hosts to trust, so the mount is refused: either supply known_hosts data or explicitly enable insecure skip.","triggerScenarios":"Thrown at core/volume_mount.go:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a KnownHosts secret containing the host's public key","Set insecureSkipHostKeyCheck: true if host verification is intentionally skipped"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}