How to authenticate with the Okteto Docker Registry API

Hi all,
I’m trying to get a list of images/tags in my Okteto registry namespace. I cannot figure out how to authenticate using the Okteto Docker Registry API and there isn’t documentation specifically for this.

I understand that I can get my personal token from okteto context show so I have that saved in a OKTETO_TOKEN env var

When trying to curl -v https://registry.cloud.okteto.net/v2/_catalog I get a 401 a An RFC7235 compliant authentication challenge header as expected.

www-authenticate: Bearer realm="https://cloud.okteto.com/auth/registry",service="okteto-registry",scope="registry:catalog:*"

So I would expect to be able to get an auth token by doing the following

curl -v -H "Authorization: Bearer $OKTETO_TOKEN" https://cloud.okteto.com/auth/registry?service=okteto-registry&scope=registry:catalog:*

But this STILL results in a 401. What am I doing wrong? How do I get the auth token?

1 Like

Hi @relston !

That API is not enabled in Okteto Cloud, since Okteto Cloud is a multi-tenant service, and the registry API is not multitenant aware. It is on our roadmap to give users more visibility on their images, but we don’t have an ETA yet.

What are you trying to accomplish by querying that API?