Skip to content

Commit 9be0825

Browse files
authored
Fix http registry oci pull (#4701)
Signed-off-by: alexey.makhonin <[email protected]>
1 parent 5d73b47 commit 9be0825

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/oci/artifact.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ func (a *Artifact) populate(ctx context.Context, opt types.RegistryOptions) erro
7878
a.m.Lock()
7979
defer a.m.Unlock()
8080

81-
ref, err := name.ParseReference(a.repository)
81+
var nameOpts []name.Option
82+
if opt.Insecure {
83+
nameOpts = append(nameOpts, name.Insecure)
84+
}
85+
86+
ref, err := name.ParseReference(a.repository, nameOpts...)
8287
if err != nil {
8388
return xerrors.Errorf("repository name error (%s): %w", a.repository, err)
8489
}

0 commit comments

Comments
 (0)