{"id":"a4a4f77a27b0f3b0","repo":"docker/cli","slug":"valid-https-url-required-for-trust-server-got-s","errorCode":null,"errorMessage":"valid https URL required for trust server, got %s","messagePattern":"valid https URL required for trust server, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/docker-trust/internal/trust/trust.go","lineNumber":86,"sourceCode":"\n// certificateDirectory returns the directory containing\n// TLS certificates for the given server. An error is\n// returned if there was an error parsing the server string.\nfunc certificateDirectory(server string) (string, error) {\n\tu, err := url.Parse(server)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn filepath.Join(config.Dir(), \"tls\", u.Host), nil\n}\n\n// Server returns the base URL for the trust server.\nfunc Server(indexName string) (string, error) {\n\tif s := os.Getenv(\"DOCKER_CONTENT_TRUST_SERVER\"); s != \"\" {\n\t\turlObj, err := url.Parse(s)\n\t\tif err != nil || urlObj.Scheme != \"https\" {\n\t\t\treturn \"\", fmt.Errorf(\"valid https URL required for trust server, got %s\", s)\n\t\t}\n\n\t\treturn s, nil\n\t}\n\tif indexName == \"docker.io\" || indexName == \"index.docker.io\" {\n\t\treturn NotaryServer, nil\n\t}\n\treturn \"https://\" + indexName, nil\n}\n\ntype simpleCredentialStore struct {\n\tauth registrytypes.AuthConfig\n}\n\nfunc (scs simpleCredentialStore) Basic(*url.URL) (string, string) {\n\treturn scs.auth.Username, scs.auth.Password\n}\n","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cmd/docker-trust/internal/trust/trust.go#L68-L104","documentation":"Error \"valid https URL required for trust server, got %s\" thrown in docker/cli.","triggerScenarios":"Thrown at cmd/docker-trust/internal/trust/trust.go:86 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}