{"record":{"id":"1f0d9433bd65e0b8","repo":"hashicorp/packer","slug":"the-source-url-must-have-at-most-16-components-an","errorCode":null,"errorMessage":"The source URL must have at most 16 components, and the one provided has %d.\nThis is unsupported by Packer, please consider using a source that has less components to it.\nIf this is a blocking issue for you, please open an issue to ask for supporting more components to the source URI.","messagePattern":"The source URL must have at most 16 components, and the one provided has (.+?)\\.\nThis is unsupported by Packer, please consider using a source that has less components to it\\.\nIf this is a blocking issue for you, please open an issue to ask for supporting more components to the source URI\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hcl2template/addrs/plugin.go","lineNumber":206,"sourceCode":"\t\t\t\t\t\"\\nDid you mean %q?\", userErrorPrefix, suggestedType)\n\t\t\t}\n\t\t}\n\t\t// Otherwise, probably instead an incorrectly-named plugin, perhaps\n\t\t// arising from a similar instinct to what causes there to be\n\t\t// thousands of Python packages on PyPI with \"python-\"-prefixed\n\t\t// names.\n\t\treturn nil, fmt.Errorf(\"Plugin source has a type with the %q prefix, which isn't valid.\\n\"+\n\t\t\t\"If you are the author of this plugin, rename it to not include the prefix.\\n\"+\n\t\t\t\"Ex: %q\",\n\t\t\tredundantPrefix,\n\t\t\tstrings.Replace(givenName, redundantPrefix, \"\", 1))\n\t}\n\n\tplug := &Plugin{\n\t\tSource: str,\n\t}\n\tif len(plug.Parts()) > 16 {\n\t\treturn nil, fmt.Errorf(\"The source URL must have at most 16 components, and the one provided has %d.\\n\"+\n\t\t\t\"This is unsupported by Packer, please consider using a source that has less components to it.\\n\"+\n\t\t\t\"If this is a blocking issue for you, please open an issue to ask for supporting more \"+\n\t\t\t\"components to the source URI.\",\n\t\t\tlen(plug.Parts()))\n\t}\n\n\treturn plug, nil\n}\n","sourceCodeStart":188,"sourceCodeEnd":215,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/hcl2template/addrs/plugin.go#L188-L215","documentation":"ParsePluginSourceString caps plugin source addresses at 16 path components (plug.Parts()). Sources split into more segments than that are unsupported by Packer's plugin addressing, and the error invites opening an issue if the limit is a blocker.","triggerScenarios":"ParsePluginSourceString given a source with more than 16 slash-separated components, e.g. a deeply nested enterprise git host path with 17+ segments.","commonSituations":"Corporate Git servers with deep group/subgroup nesting (GitLab nested namespaces); auto-generated source strings from internal tooling.","solutions":["Flatten or shorten the repository path so it has at most 16 components","Use a redirect, proxy, or shorter alias/vanity hostname for the deeply nested repo","Open a Packer issue if the limit genuinely blocks your source layout"],"exampleFix":"// before\nsource = \"git.example.com/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/my-plugin\"\n// after (aliased, <=16 parts)\nsource = \"plugins.example.com/my-plugin\"","handlingStrategy":"validation","validationCode":"if len(strings.Split(src, \"/\")) > 16 { /* shorten or alias source before installing */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use vanity hostnames or redirects for deeply nested repo paths","Keep plugin repos near the git host root","Count source path segments in CI checks"],"tags":["validation","plugin-source","limits","hcl2"],"backgroundTag":"source-address-too-long","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"}