Skip to content

Commit

Permalink
bug: allow http protocol for oci access (#1060)
Browse files Browse the repository at this point in the history
<!-- markdownlint-disable MD041 -->
#### 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
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
  • Loading branch information
fabianburth authored Nov 7, 2024
1 parent 37c6514 commit 3577e7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/ocm/extensions/accessmethods/ociartifact/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3577e7e

Please sign in to comment.