{"id":"46109f281af71cd7","repo":"docker/cli","slug":"could-not-remove-signature-for-s-w","errorCode":null,"errorMessage":"could not remove signature for %s: %w","messagePattern":"could not remove signature for (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/docker-trust/trust/revoke.go","lineNumber":66,"sourceCode":"\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}\n\ntype cancelledErr struct{ error }\n\nfunc (cancelledErr) Cancelled() {}\n\nfunc revokeSignature(notaryRepo client.Repository, tag string) error {\n\tif tag != \"\" {\n\t\t// Revoke signature for the specified tag\n\t\tif err := revokeSingleSig(notaryRepo, tag); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\t// revoke all signatures for the image, as no tag was given\n\t\tif err := revokeAllSigs(notaryRepo); err != nil {","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cmd/docker-trust/trust/revoke.go#L48-L84","documentation":"Error \"could not remove signature for %s: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cmd/docker-trust/trust/revoke.go:66 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}