{"record":{"id":"2c2f8847833711e9","repo":"hashicorp/packer","slug":"q-not-implemented","errorCode":null,"errorMessage":"%q not implemented","messagePattern":"%q not implemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin-getter/github/getter.go","lineNumber":266,"sourceCode":"\tcase \"sha256\":\n\t\t// something like https://github.com/sylviamoss/packer-plugin-comment/releases/download/v0.2.11/packer-plugin-comment_v0.2.11_x5_SHA256SUMS\n\t\tu := filepath.ToSlash(\"https://github.com/\" + ghURI.RealRelativePath() + \"/releases/download/\" + opts.Version() + \"/\" + opts.PluginRequirement.FilenamePrefix() + opts.Version() + \"_SHA256SUMS\")\n\t\treq, err = g.Client.NewRequest(\n\t\t\t\"GET\",\n\t\t\tu,\n\t\t\tnil,\n\t\t)\n\t\ttransform = TransformChecksumStream()\n\tcase \"zip\":\n\t\tu := filepath.ToSlash(\"https://github.com/\" + ghURI.RealRelativePath() + \"/releases/download/\" + opts.Version() + \"/\" + opts.ExpectedZipFilename())\n\t\treq, err = g.Client.NewRequest(\n\t\t\t\"GET\",\n\t\t\tu,\n\t\t\tnil,\n\t\t)\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"%q not implemented\", what)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlog.Printf(\"[DEBUG] github-getter: getting %q\", req.URL)\n\tresp, err := g.Client.BareDo(ctx, req)\n\tif err != nil {\n\t\t// here BareDo will return an err if the request failed or if the status\n\t\t// is not considered a valid http status. So we have to close the body\n\t\t// if it's not nil.\n\t\tif resp != nil {\n\t\t\tresp.Body.Close()\n\t\t}\n\t\tswitch err := err.(type) {\n\t\tcase *github.RateLimitError:\n\t\t\treturn nil, &plugingetter.RateLimitError{\n\t\t\t\tSetableEnvVar: ghTokenAccessor,\n\t\t\t\tErr:           err,","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin-getter/github/getter.go#L248-L284","documentation":"The GitHub plugin-getter only supports HTTP(S) fetch operations. Get() builds an HTTP request based on the URL scheme and, for any scheme other than http/https (the switch's default branch), refuses to proceed. This is a deliberate guard: the getter cannot speak other protocols like file:// or ftp://.","triggerScenarios":"Calling Getter.Get(ctx, u, what) where u.Scheme is not \"http\" or \"https\" (e.g. a file://, ftp://, or ssh:// URL); the what argument (GET/POST-like verb) is also switched on, so an unrecognized verb string reaches the default case.","commonSituations":"A plugin URL in required_plugins or PACKER_PLUGIN_PATH points at a non-HTTP source; a misconfigured mirror or proxy URL uses an unsupported scheme; tests or tooling pass a local file path instead of an HTTPS release URL.","solutions":["Use an https:// URL for the plugin download source (e.g. the GitHub release asset URL).","If you need local installs, use `packer plugins install` with the registry path or place binaries in PACKER_PLUGIN_PATH manually instead of routing through this getter.","If a custom scheme is legitimately needed, wrap or fork the getter and add a case in the switch."],"exampleFix":"// before\ng.Get(ctx, \"file:///opt/plugins/github.com/foo/bar\", plugingetter.GET)\n// after\ng.Get(ctx, \"https://github.com/foo/bar/releases/download/...\", plugingetter.GET)","handlingStrategy":"validation","validationCode":"u, err := url.Parse(rawURL)\nif err != nil || (u.Scheme != \"http\" && u.Scheme != \"https\") {\n\treturn fmt.Errorf(\"github getter requires http(s), got %q\", u.Scheme)\n}","typeGuard":"func isHTTPOrHTTPS(u *url.URL) bool { return u != nil && (u.Scheme == \"http\" || u.Scheme == \"https\") }","tryCatchPattern":"if _, err := g.Get(ctx, u, \"GET\"); err != nil {\n\tif strings.Contains(err.Error(), \"not implemented\") {\n\t\t// fall back to the default getter or a local install path\n\t}\n}","preventionTips":["Always pass https:// release URLs to the github getter","Handle local files with a file-based install path, not this getter","Validate URL scheme at config load time"],"tags":["plugin-getter","network","unsupported-scheme","github"],"backgroundTag":"unsupported-url-scheme","analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}