{"id":"6455c993f0280dcc","repo":"docker/cli","slug":"invalid-user-w","errorCode":null,"errorMessage":"invalid user: %w","messagePattern":"invalid user: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/connhelper/ssh/ssh.go","lineNumber":112,"sourceCode":"\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\n\t// We consider \"sshFlags\" to be \"trusted\", and set from code only,\n\t// as they are not parsed from the DOCKER_HOST URL.\n\targs = append(args, sshFlags...)\n\n\thost, err := syntax.Quote(sp.Host, syntax.LangPOSIX)\n\tif err != nil {","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/connhelper/ssh/ssh.go#L94-L130","documentation":"Error \"invalid user: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/connhelper/ssh/ssh.go:112 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}