{"record":{"id":"2f2b0ad4afe9e02c","repo":"GoogleContainerTools/skaffold","slug":"s-is-not-a-valid-url","errorCode":null,"errorMessage":"%s is not a valid URL","messagePattern":"(.+?) is not a valid URL","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/kubernetes/manifest/url.go","lineNumber":52,"sourceCode":"\tdir := filepath.Join(ManifestTmpDir, ManifestsFromURL)\n\tif err := os.MkdirAll(dir, os.ModePerm); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create the tmp directory: %w\", err)\n\t}\n\tvar paths []string\n\tfor _, manifest := range manifests {\n\t\tout, err := downloadFromURL(dir, manifest)\n\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpaths = append(paths, out)\n\t}\n\treturn paths, nil\n}\n\nfunc downloadFromURL(destDir string, manifest string) (string, error) {\n\tif manifest == \"\" || !util.IsURL(manifest) {\n\t\treturn \"\", fmt.Errorf(\"%s is not a valid URL\", manifest)\n\t}\n\n\tresp, err := http.Get(manifest)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to download manifest from %s, err : %w\", manifest, err)\n\t}\n\tdefer resp.Body.Close()\n\n\tf, err := os.CreateTemp(destDir, \"*.yaml\")\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to create manifest file: %w\", err)\n\t}\n\tdefer f.Close()\n\t_, err = io.Copy(f, resp.Body)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to write manifest to file, err: %w\", err)\n\t}\n","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/manifest/url.go#L34-L70","documentation":"downloadFromURL validates each manifest string with util.IsURL before fetching. An empty string or anything that is not an http(s)/gcs-style URL fails validation and returns this error, aborting that manifest's download.","triggerScenarios":"Passing an empty string, a local file path, or a malformed URL (missing scheme, spaces) in the manifests list given to DownloadFromURL / resolveRemoteAndLocal.","commonSituations":"skaffold config listing local paths mixed with remote URLs in a url: manifest source; typos like 'htp://'; env-var interpolation leaving an empty value.","solutions":["Correct the manifest entry to a full valid URL, e.g. https://host/path/manifest.yaml","Remove empty entries from the manifests list","For local files, use the local file manifest source instead of url:"],"exampleFix":"# before\n- manifests:\n  - \"\"\n# after\n- manifests:\n  - \"https://raw.githubusercontent.com/org/repo/main/k8s/deploy.yaml\"","handlingStrategy":"validation","validationCode":"for _, u := range manifests {\n    if u == \"\" || !util.IsURL(u) {\n        return fmt.Errorf(\"manifest %q is not a valid URL\", u)\n    }\n}","typeGuard":"func isHTTPURL(s string) bool {\n    u, err := url.Parse(s)\n    return err == nil && (u.Scheme == \"http\" || u.Scheme == \"https\") && u.Host != \"\"\n}","tryCatchPattern":null,"preventionTips":["Keep url: manifest entries to full http(s) URLs only","Guard env-var interpolation so it never yields an empty entry","Validate config with `skaffold diagnose` before running"],"tags":["validation","url","manifests","config"],"backgroundTag":"invalid-url","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}