Skip to content

auth error for non existing directory #10

Description

@hawksight

If you are looking at a harbor registry for a particular path that doesn't exist, the error can be miss-leading:

./seaglass repos private-registry.venafi.cloud/public --recursive
Error: listing repositories: listing repositories: [GET /projects/{project_name}/repositories][403] listRepositoriesForbidden  &{Errors:[0x140003a2100]}
Usage:
  seaglass repos [flags]

Flags:
  -h, --help        help for repos
      --recursive   List repositories recursively

I only came across this as I was comparing our Venafi public registry with the private one:

./seaglass repos registry.venafi.cloud/public --recursive

This could happen regularly:

  • Because it's often hard to know what the path should be
  • A copy paste fail from some doc site, missing the last character for example

I'll take a guess that an OCI repo returns 403 if your reference a path that doesn't exist.
But if there was some way of validating the path doesn't exist and feeding that back in the error, it would be a nicer experience for a user.

Eg. maybe something like:

./seaglass repos private-registry.venafi.cloud/public --recursive

Error: Path does not exist: private-registry.venafi.cloud/public

Usage:
  seaglass repos [flags]

Flags:
  -h, --help        help for repos
      --recursive   List repositories recursively

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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