diff --git a/cli/command/image/trust.go b/cli/command/image/trust.go index b4a6d84a00..21f9cf8c1d 100644 --- a/cli/command/image/trust.go +++ b/cli/command/image/trust.go @@ -41,20 +41,6 @@ func newNotaryClient(cli command.Streams, imgRefAndAuth trust.ImageRefAndAuth) ( return trust.GetNotaryRepository(cli.In(), cli.Out(), command.UserAgent(), imgRefAndAuth.RepoInfo(), imgRefAndAuth.AuthConfig(), "pull") } -// TrustedPush handles content trust pushing of an image. -// -// Deprecated: this function was only used internally and will be removed in the next release. -func TrustedPush(ctx context.Context, cli command.Cli, repoInfo *registry.RepositoryInfo, ref reference.Named, authConfig registrytypes.AuthConfig, options image.PushOptions) error { - responseBody, err := cli.Client().ImagePush(ctx, reference.FamiliarString(ref), options) - if err != nil { - return err - } - - defer responseBody.Close() - - return trust.PushTrustedReference(ctx, cli, repoInfo, ref, authConfig, responseBody, command.UserAgent()) -} - // PushTrustedReference pushes a canonical reference to the trust server. // // Deprecated: use [trust.PushTrustedReference] instead. this function was only used internally and will be removed in the next release.