{"record":{"id":"e8a1a02db3da0e71","repo":"docker/cli","slug":"error-parsing-name-for-manifest-list-s-w","errorCode":null,"errorMessage":"error parsing name for manifest list %s: %w","messagePattern":"error parsing name for manifest list (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/manifest/create_list.go","lineNumber":42,"sourceCode":"\t\tShort: \"Create a local manifest list for annotating and pushing to a registry\",\n\t\tArgs:  cli.RequiresMinArgs(2),\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\treturn createManifestList(cmd.Context(), dockerCLI, args, opts)\n\t\t},\n\t\tDisableFlagsInUseLine: true,\n\t}\n\n\tflags := cmd.Flags()\n\tflags.BoolVar(&opts.insecure, \"insecure\", false, \"Allow communication with an insecure registry\")\n\tflags.BoolVarP(&opts.amend, \"amend\", \"a\", false, \"Amend an existing manifest list\")\n\treturn cmd\n}\n\nfunc createManifestList(ctx context.Context, dockerCLI command.Cli, args []string, opts createOpts) error {\n\tnewRef := args[0]\n\ttargetRef, err := normalizeReference(newRef)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error parsing name for manifest list %s: %w\", newRef, err)\n\t}\n\n\tmanifestStore := newManifestStore(dockerCLI)\n\t_, err = manifestStore.GetList(targetRef)\n\tswitch {\n\tcase errdefs.IsNotFound(err):\n\t\t// New manifest list\n\tcase err != nil:\n\t\treturn err\n\tcase !opts.amend:\n\t\treturn errors.New(\"refusing to amend an existing manifest list with no --amend flag\")\n\t}\n\n\t// Now create the local manifest list transaction by looking up the manifest schemas\n\t// for the constituent images:\n\tmanifests := args[1:]\n\tfor _, manifestRef := range manifests {\n\t\tnamedRef, err := normalizeReference(manifestRef)","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/command/manifest/create_list.go#L24-L60","documentation":"Returned by `createManifestList` (create_list.go:40-43) when `normalizeReference(newRef)` fails on the first positional argument of `docker manifest create`. The manifest-list name must be a valid Docker reference (repository[:tag]). The %w wraps the distribution/reference parse error.","triggerScenarios":"Running `docker manifest create 'invalid name with spaces' img` or a name with illegal characters / uppercase. Also when the name lacks a tag (a default `:latest` is added, but parsing still requires a valid repository).","commonSituations":"Typos, unquoted shell expansion, pasting a URL with scheme (`https://...`), or exceeding the 256-char path component limit.","solutions":["Provide a valid `registry/repo[:tag]` name.","Quote the argument to avoid shell word-splitting.","Drop any URL scheme (`https://`) — use bare hostname.","Use lowercase repository components only."],"exampleFix":"# before\ndocker manifest create 'https://reg.io/My List' img\n# after\ndocker manifest create reg.io/mylist:1.0 img","handlingStrategy":"validation","validationCode":"if _, err := reference.ParseNormalizedNamed(listName); err != nil {\n    return fmt.Errorf(\"manifest-list name %q is not a valid reference: %w\", listName, err)\n}","typeGuard":null,"tryCatchPattern":"if err := createManifestList(ctx, cli, args, opts); err != nil {\n    if strings.HasPrefix(err.Error(), \"error parsing name for manifest list\") {\n        return fmt.Errorf(\"first argument must be a valid repository[:tag]; got %q\", args[0])\n    }\n    return err\n}","preventionTips":["Validate the list name with distribution/reference before create.","Use lowercase, no scheme, no spaces.","Quote shell arguments."],"tags":["manifest","create","reference","validation","docker-cli"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}