{"id":"f786e4cc6feef86f","repo":"docker/cli","slug":"no-host-specified","errorCode":null,"errorMessage":"no host specified","messagePattern":"no host specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/connhelper/ssh/ssh.go","lineNumber":106,"sourceCode":"\tremoteCommand, err := quoteCommand(remoteCommandAndArgs...)\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tsshArgs, err := sp.args()\n\tif err != nil {\n\t\treturn nil\n\t}\n\tif remoteCommand != \"\" {\n\t\tsshArgs = append(sshArgs, remoteCommand)\n\t}\n\treturn sshArgs\n}\n\nfunc (sp *Spec) args(sshFlags ...string) ([]string, error) {\n\tvar args []string\n\tif sp.Host == \"\" {\n\t\treturn nil, errors.New(\"no host specified\")\n\t}\n\tif sp.User != \"\" {\n\t\t// Quote user, as it's obtained from the URL.\n\t\tusr, err := syntax.Quote(sp.User, syntax.LangPOSIX)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid user: %w\", err)\n\t\t}\n\t\targs = append(args, \"-l\", usr)\n\t}\n\tif sp.Port != \"\" {\n\t\t// Quote port, as it's obtained from the URL.\n\t\tport, err := syntax.Quote(sp.Port, syntax.LangPOSIX)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid port: %w\", err)\n\t\t}\n\t\targs = append(args, \"-p\", port)\n\t}\n","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/connhelper/ssh/ssh.go#L88-L124","documentation":"Error \"no host specified\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/connhelper/ssh/ssh.go:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}