{"id":"ed9802d4577ce23a","repo":"docker/cli","slug":"trust-revoke-has-been-cancelled","errorCode":null,"errorMessage":"trust revoke has been cancelled","messagePattern":"trust revoke has been cancelled","errorType":"exception","errorClass":"cancelledErr","httpStatus":null,"severity":"error","filePath":"cmd/docker-trust/trust/revoke.go","lineNumber":52,"sourceCode":"\treturn cmd\n}\n\nfunc revokeTrust(ctx context.Context, dockerCLI command.Cli, remote string, options revokeOptions) error {\n\timgRefAndAuth, err := trust.GetImageReferencesAndAuth(ctx, authResolver(dockerCLI), remote)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttag := imgRefAndAuth.Tag()\n\tif imgRefAndAuth.Tag() == \"\" && imgRefAndAuth.Digest() != \"\" {\n\t\treturn errors.New(\"cannot use a digest reference for IMAGE:TAG\")\n\t}\n\tif imgRefAndAuth.Tag() == \"\" && !options.forceYes {\n\t\tdeleteRemote, err := prompt.Confirm(ctx, dockerCLI.In(), dockerCLI.Out(), fmt.Sprintf(\"Confirm you would like to delete all signature data for %s?\", remote))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !deleteRemote {\n\t\t\treturn cancelledErr{errors.New(\"trust revoke has been cancelled\")}\n\t\t}\n\t}\n\n\tnotaryRepo, err := newNotaryClient(dockerCLI, imgRefAndAuth, trust.ActionsPushAndPull)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err = clearChangeList(notaryRepo); err != nil {\n\t\treturn err\n\t}\n\tdefer clearChangeList(notaryRepo)\n\tif err := revokeSignature(notaryRepo, tag); err != nil {\n\t\treturn fmt.Errorf(\"could not remove signature for %s: %w\", remote, err)\n\t}\n\t_, _ = fmt.Fprintf(dockerCLI.Out(), \"Successfully deleted signature for %s\\n\", remote)\n\treturn nil\n}","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cmd/docker-trust/trust/revoke.go#L34-L70","documentation":"Error \"trust revoke has been cancelled\" thrown in docker/cli.","triggerScenarios":"Thrown at cmd/docker-trust/trust/revoke.go:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}