Skip to content

[bug]: Cannot add labels to artifacts #814

@pharaofranz

Description

@pharaofranz

Description

I am the admin on a harbor deployment and I log in as admin via harbor-cli. It seems impossible to add labels to artifacts via the CLI. Regardless of whether these are existing labels, newly added labels, whether or not I use the digest or the tag, whether or not the scope of the label is 'g' or 'p', whether or not I use the name or the ID of the label. Even using the interactive prompt does not help.

Steps to Reproduce

  1. Run command: harbor-cli artifact label add project/repo:tag <labelName/labelId
  2. With arguments/config: see above
  3. Observe error
Error: failed to get label id: invalid scope: 

Expected Behavior

The label is added to the artifact.

Actual Behavior

See above error.

Environment

  • OS: Ubuntu 22.04
  • Tool version: 0.0.18
  • Other relevant details: Installed via dpkg -i harbor-cli_0.0.18_amd64.deb; i.e. just the binary.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions