Skip to content

unauthorized to list catalog #81

Open

Description

@badsmoke

Hello I get a "unauthorized to list catalog",

i want to sync images from a harbor instance, the login is correct (checked several times, i can push to it with the same credentials), the link works too.

level=error msg="error getting catalog page: GET https://hub.domain.com/v2/_catalog?last=&n=100: UNAUTHORIZED: unauthorized to list catalog"

to the config:

i would like to syncronize two namespaces with the help of regex, harbor itself offers this possibility only very limited.

?last=&n=100
what still surprises me is that the number of tags to be retrieved is set to 100, even though 1000 is set in the config.

i use the latest xelalex/dregsy docker image version

in another sync job, i push to the same harbor instance, that works.

But with the list there are problems

I hope you can help me

Activity

  1. xelalexv commented on Sep 22, 2022

    @xelalexv
    Owner

    Sorry for the late reply! I'm not familiar with Harbor, and don't have an instance available for testing right now. In general, push&pull authorization may not necessarily be the same as authorization for listing catalogs. It's also possible that Harbor doesn't fully implement v2/_catalog, or does it in a slightly different way.

    Could you try to retrieve the catalog with curl using the URL from the error message? We need to find out whether Harbor's implementation of the v2/_catalog API possibly requires a bearer token for authentication. dregsy currently uses basic auth by default, and bearer token only for GCR registries. You will probably have to experiment a little to get the right bearer token into the curl request.

    ?last=&n=100
    what still surprises me is that the number of tags to be retrieved is set to 100, even though 1000 is set in the config.

    The n=100 is just the page size. If you set lister.maxItems to 1000, then at most 10 pages will be retrieved.

  2. badsmoke commented on Nov 8, 2022

    @badsmoke
    Author

    now i have lost sight of it myself.

    with basic auth i can get everything without problems

    curl https://user:password@hub.zigpos.com/v2/_catalog?last=&n=1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions