From 3577e7e9d72f25a84037aa34818a18c735e95d0a Mon Sep 17 00:00:00 2001 From: Fabian Burth Date: Thu, 7 Nov 2024 18:09:53 +0100 Subject: [PATCH] bug: allow http protocol for oci access (#1060) #### What this PR does / why we need it Although we allow to fetch components from an `http` registry by specifying the scheme, we unintentionally didn't enable fetching artifacts specified in an oci access from an http registries due to this bug. #### Which issue(s) this PR fixes --- api/ocm/extensions/accessmethods/ociartifact/method.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/ocm/extensions/accessmethods/ociartifact/method.go b/api/ocm/extensions/accessmethods/ociartifact/method.go index a8cb908410..38fef2b5ef 100644 --- a/api/ocm/extensions/accessmethods/ociartifact/method.go +++ b/api/ocm/extensions/accessmethods/ociartifact/method.go @@ -227,7 +227,7 @@ func (m *accessMethod) eval(relto oci.Repository) error { ocictx := m.ctx.OCIContext() spec := ocictx.GetAlias(ref.Host) if spec == nil { - spec = ocireg.NewRepositorySpec(ref.Host) + spec = ocireg.NewRepositorySpec(ref.RepositoryRef()) } repo, err := ocictx.RepositoryForSpec(spec) if err != nil {