Update pkg/registry/client.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
(cherry picked from commit 26ada49c1a)
release-4.2
Terry Howe 4 months ago committed by Scott Rigby
parent 9569605ecc
commit 430dfac3ee
No known key found for this signature in database
GPG Key ID: C7C6FBB5B91C1155

@ -939,9 +939,6 @@ func (c *Client) tagManifest(ctx context.Context, memoryStore *memory.Store,
// auth?scope=repository%3Atestrepo%2Flocal-subchart%3Apull%2Cpush&service=testservice
// we can set the actions like below
// example) ctx = withScopeHint(ctx, repository, auth.ActionPush, auth.ActionPull)
func withScopeHint(ctx context.Context, target any, actions ...string) context.Context {
if repo, ok := target.(*remote.Repository); ok {
return auth.AppendRepositoryScope(ctx, repo.Reference, actions...)
}
return ctx
func withScopeHint(ctx context.Context, repo *remote.Repository, actions ...string) context.Context {
return auth.AppendRepositoryScope(ctx, repo.Reference, actions...)
}

Loading…
Cancel
Save