Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth error for non existing directory #10

Open
hawksight opened this issue Oct 18, 2024 · 0 comments
Open

auth error for non existing directory #10

hawksight opened this issue Oct 18, 2024 · 0 comments

Comments

@hawksight
Copy link
Contributor

hawksight commented Oct 18, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant