Any way to check a repository similar to the registry ping? #1106
Unanswered
psheichelberg
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Harbor registry with a public repository, lets say
harbor.example.com/path/to/my/repository. I want to use this repository for an Argo CD Application.Argo CD uses
func (*Registry) Pingto test if a given URL is an OCI registry. Unfortunately this fails with401 Unauthorized, becausePing()sends a request to/v2/, Harbor responds with theWww-Authenticateheader andPing()uses the information from this header to make a request to/service/tokenand this fails without credentials. If this second request would be scoped (scope=repository:path/to/my/repository:pull) it would succeed, because the repository is public.I think
Ping()is (probably) not doing anything wrong here. But I am wondering if there is a better way for Argo CD to check the repository.Maybe by using the
func (*Repository) Tags?Or maybe this is a request for a new
func (*Repository) Pingin oras-go which could be used to check a repository. 😅Thank you in advance! ❤️
Beta Was this translation helpful? Give feedback.
All reactions