registry-cli
registry-cli copied to clipboard
harbor v2.x support
When listing images on harbor v2.1.0, e.g.,
docker run --disable-content-trust --rm anoxis/registry-cli -r https://demo.goharbor.io -l '<id>:<password>'
nothing is displayed. the demo.goharbor.io is open to every one, I signed up for an account, created a project, pushed a image fopr this test. There are other images at demo.goharbor.io.
When listing images on harbor v2.0.3 using a command identical to above except the registry url and credential and with additional parameter --no-validate-ssl
, the following error is displayed:
couldnt accure token: Method Not Allowed
The harbor api was tested ok using the same credential on urls similar to the following:
https://<host>/api/v2.0/projects/<project>/repositories/<repo>
https://<host>/api/v2.0/projects/<project>/repositories/<repo>/artifacts
https://<host>/api/v2.0/projects/<project>/repositories/<repo>/artifacts/<tagname>
https://<host>/api/v2.0/projects/<project>/repositories/<repo>/artifacts/<tagname>/tags
Hi @wu105, I briefly looked at harbor docs and seems they have "tag retention" feature. I suggest you to explore it and try it. It might be better than 3rd party script ;)