docker/cli ยท error
signer name "%s" must start with lowercase alphanumeric char
Error message
signer name "%s" must start with lowercase alphanumeric characters and can include "-" or "_" after the first character
What it means
Error "signer name "%s" must start with lowercase alphanumeric characters and can include "-" or "_" after the first character" thrown in docker/cli.
Source
Thrown at cmd/docker-trust/trust/signer_add.go:53
RunE: func(cmd *cobra.Command, args []string) error {
options.signer = args[0]
options.repos = args[1:]
return addSigner(cmd.Context(), dockerCLI, options)
},
DisableFlagsInUseLine: true,
}
flags := cmd.Flags()
options.keys = opts.NewListOpts(nil)
flags.Var(&options.keys, "key", "Path to the signer's public key file")
return cmd
}
var validSignerName = lazyregexp.New(`^[a-z0-9][a-z0-9\_\-]*$`).MatchString
func addSigner(ctx context.Context, dockerCLI command.Cli, options signerAddOptions) error {
signerName := options.signer
if !validSignerName(signerName) {
return fmt.Errorf("signer name \"%s\" must start with lowercase alphanumeric characters and can include \"-\" or \"_\" after the first character", signerName)
}
if signerName == "releases" {
return errors.New("releases is a reserved keyword, use a different signer name")
}
if options.keys.Len() == 0 {
return errors.New("path to a public key must be provided using the `--key` flag")
}
signerPubKeys, err := ingestPublicKeys(options.keys.GetSlice())
if err != nil {
return err
}
var errRepos []string
for _, repoName := range options.repos {
_, _ = fmt.Fprintf(dockerCLI.Out(), "Adding signer \"%s\" to %s...\n", signerName, repoName)
if err := addSignerToRepo(ctx, dockerCLI, signerName, repoName, signerPubKeys); err != nil {
_, _ = fmt.Fprintln(dockerCLI.Err(), err.Error()+"\n")
errRepos = append(errRepos, repoName)View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cmd/docker-trust/trust/signer_add.go:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/bffe5dbaef8304fa.json.
Report an issue: GitHub.