Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 2cd1419

Browse files
committed
Use Authorizer.
Signed-off-by: Lantao Liu <[email protected]>
1 parent 5a54764 commit 2cd1419

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/server/image_pull.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ func (c *criService) getResolver(ctx context.Context, ref string, cred func(stri
261261
return nil, imagespec.Descriptor{}, errors.Wrapf(err, "parse registry endpoint %q", e)
262262
}
263263
resolver := docker.NewResolver(docker.ResolverOptions{
264-
Credentials: cred,
265-
Client: http.DefaultClient,
266-
Host: func(string) (string, error) { return u.Host, nil },
264+
Authorizer: docker.NewAuthorizer(http.DefaultClient, cred),
265+
Client: http.DefaultClient,
266+
Host: func(string) (string, error) { return u.Host, nil },
267267
// By default use "https".
268268
PlainHTTP: u.Scheme == "http",
269269
})

0 commit comments

Comments
 (0)