{"record":{"id":"6c2fd56130a36c1b","repo":"opentofu/opentofu","slug":"oci-source-type-requires-an-absolute-url","errorCode":null,"errorMessage":"oci source type requires an absolute URL","messagePattern":"oci source type requires an absolute URL","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/getmodules/oci_getter.go","lineNumber":183,"sourceCode":"func (g *ociDistributionGetter) SetClient(client *getter.Client) {\n\tg.client = client\n}\n\nfunc (g *ociDistributionGetter) context() context.Context {\n\t// go-getter was designed long before [context.Context] existed, so\n\t// it passes us a context only indirectly through the client.\n\tif g == nil || g.client == nil {\n\t\treturn context.Background() // For robustness, but client should always be set in practice\n\t}\n\treturn g.client.Ctx\n}\n\nfunc (g *ociDistributionGetter) resolveRepositoryRef(url *url.URL) (*orasRegistry.Reference, error) {\n\tif !url.IsAbs() {\n\t\t// Should not get here, but just for robustness since go-getter\n\t\t// is a little quirky in what it allows users to express\n\t\t// with its source address syntax.\n\t\treturn nil, fmt.Errorf(\"oci source type requires an absolute URL\")\n\t}\n\tif url.Scheme != \"oci\" {\n\t\t// We can potentially get in here if the author writes a bizarre\n\t\t// source address with an explicit getter separate from the\n\t\t// scheme, like oci::https://example.com/ .\n\t\treturn nil, fmt.Errorf(\"oci source type only supports oci URL scheme\")\n\t\t// Most authors will hopefully write just oci:// as the scheme part\n\t\t// and let go-getter automatically select the oci getter based on\n\t\t// that, in which case the scheme will be set correctly.\n\t}\n\n\t// As usual, registryDomainName can optionally include a trailing\n\t// port number separated by a colon despite the name. This is a\n\t// standard naming quirk in OCI Distribution implementations,\n\t// since most addresses do not use an explicit port number.\n\tregistryDomainName := url.Host\n\n\t// The OpenTofu module installer has already stripped off any","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/opentofu/opentofu/blob/3561785c48c1ce615e7c50261bd351f26053efa2/internal/getmodules/oci_getter.go#L165-L201","documentation":"Error \"oci source type requires an absolute URL\" thrown in opentofu/opentofu.","triggerScenarios":"Thrown at internal/getmodules/oci_getter.go:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3561785c48c1ce615e7c50261bd351f26053efa2","analyzedAt":"2026-08-15T23:27:16.226Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}