Skip to content

Commit aae0202

Browse files
authored
Include target resource in credential warning (#882)
1 parent 91666fb commit aae0202

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/v1/google/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func WithAuthFromKeychain(keys authn.Keychain) ListerOption {
4949
return err
5050
}
5151
if auth == authn.Anonymous {
52-
logs.Warn.Println("No matching credentials were found, falling back on anonymous")
52+
logs.Warn.Printf("No matching credentials were found for %q, falling back on anonymous", l.repo.Registry)
5353
}
5454
l.auth = auth
5555
return nil

pkg/v1/remote/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func makeOptions(target authn.Resource, opts ...Option) (*options, error) {
6666
return nil, err
6767
}
6868
if auth == authn.Anonymous {
69-
logs.Warn.Println("No matching credentials were found, falling back on anonymous")
69+
logs.Warn.Printf("No matching credentials were found for %q, falling back on anonymous", target)
7070
}
7171
o.auth = auth
7272
}

0 commit comments

Comments
 (0)