{"id":"a82c387b32a7a776","repo":"docker/cli","slug":"incorrect-scheme-s","errorCode":null,"errorMessage":"incorrect scheme: %s","messagePattern":"incorrect scheme: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/connhelper/ssh/ssh.go","lineNumber":46,"sourceCode":"// an error if the URL is using the wrong scheme, contains fragments,\n// query-parameters, or contains a password.\nfunc NewSpec(sshURL *url.URL) (*Spec, error) {\n\ts, err := newSpec(sshURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid SSH URL: %w\", err)\n\t}\n\treturn s, nil\n}\n\nfunc newSpec(u *url.URL) (*Spec, error) {\n\tif u == nil {\n\t\treturn nil, errors.New(\"URL is nil\")\n\t}\n\tif u.Scheme == \"\" {\n\t\treturn nil, errors.New(\"no scheme provided\")\n\t}\n\tif u.Scheme != \"ssh\" {\n\t\treturn nil, errors.New(\"incorrect scheme: \" + u.Scheme)\n\t}\n\n\tvar sp Spec\n\n\tif u.User != nil {\n\t\tsp.User = u.User.Username()\n\t\tif _, ok := u.User.Password(); ok {\n\t\t\treturn nil, errors.New(\"plain-text password is not supported\")\n\t\t}\n\t}\n\tsp.Host = u.Hostname()\n\tif sp.Host == \"\" {\n\t\treturn nil, errors.New(\"hostname is empty\")\n\t}\n\tsp.Port = u.Port()\n\tsp.Path = u.Path\n\tif u.RawQuery != \"\" {\n\t\treturn nil, fmt.Errorf(\"query parameters are not allowed: %q\", u.RawQuery)","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/connhelper/ssh/ssh.go#L28-L64","documentation":"Error \"incorrect scheme: %s\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/connhelper/ssh/ssh.go:46 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}