{"id":"72ea46537552a74d","repo":"docker/cli","slug":"no-tag-specified-for-s","errorCode":null,"errorMessage":"no tag specified for %s","messagePattern":"no tag specified for (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/docker-trust/trust/sign.go","lineNumber":141,"sourceCode":"\terr = trust.AddToAllSignableRoles(notaryRepo, &target)\n\tif err == nil {\n\t\tprettyPrintExistingSignatureInfo(out, existingSigInfo)\n\t\terr = notaryRepo.Publish()\n\t}\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to sign %s:%s: %w\", imgRefAndAuth.RepoInfo().Name.Name(), tag, err)\n\t}\n\t_, _ = fmt.Fprintf(out, \"Successfully signed %s:%s\\n\", imgRefAndAuth.RepoInfo().Name.Name(), tag)\n\treturn nil\n}\n\nfunc validateTag(imgRefAndAuth trust.ImageRefAndAuth) error {\n\ttag := imgRefAndAuth.Tag()\n\tif tag == \"\" {\n\t\tif imgRefAndAuth.Digest() != \"\" {\n\t\t\treturn errors.New(\"cannot use a digest reference for IMAGE:TAG\")\n\t\t}\n\t\treturn fmt.Errorf(\"no tag specified for %s\", imgRefAndAuth.Name())\n\t}\n\treturn nil\n}\n\nfunc checkLocalImageExistence(ctx context.Context, apiClient client.APIClient, imageName string) error {\n\t_, err := apiClient.ImageInspect(ctx, imageName)\n\treturn err\n}\n\nfunc createTarget(notaryRepo notaryclient.Repository, tag string) (notaryclient.Target, error) {\n\ttarget := &notaryclient.Target{}\n\tvar err error\n\tif tag == \"\" {\n\t\treturn *target, errors.New(\"no tag specified\")\n\t}\n\ttarget.Name = tag\n\ttarget.Hashes, target.Length, err = getSignedManifestHashAndSize(notaryRepo, tag)\n\treturn *target, err","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cmd/docker-trust/trust/sign.go#L123-L159","documentation":"Error \"no tag specified for %s\" thrown in docker/cli.","triggerScenarios":"Thrown at cmd/docker-trust/trust/sign.go:141 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}