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?