Skip to content

Commit

Permalink
ctr: print error when pull auth fails
Browse files Browse the repository at this point in the history
Signed-off-by: Darren Stahl <darst@microsoft.com>
  • Loading branch information
darstahl committed Jan 24, 2018
1 parent 12eaf13 commit f404331
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions remotes/docker/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ func (r *dockerResolver) Resolve(ctx context.Context, ref string) (string, ocisp
log.G(ctx).Debug("resolving")
resp, err := fetcher.doRequestWithRetries(ctx, req, nil)
if err != nil {
if errors.Cause(err) == ErrInvalidAuthorization {
err = errors.Wrapf(err, "pull access denied, repository does not exist or may require authorization")
}
return "", ocispec.Descriptor{}, err
}
resp.Body.Close() // don't care about body contents.
Expand Down

0 comments on commit f404331

Please sign in to comment.