You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Activity
xelalexv commentedon Sep 22, 2022
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
curlusing the URL from the error message? We need to find out whether Harbor's implementation of thev2/_catalogAPI 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.The
n=100is just the page size. If you setlister.maxItemsto 1000, then at most 10 pages will be retrieved.badsmoke commentedon Nov 8, 2022
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