What user should I use for harbor container registry login?

181 Views Asked by At

I want to get a temporary scoped token for a repository for the harbor. Previously we were using ACR. With ACR, we were using 00000000-0000-0000-0000-000000000000 as username with JWT as password.

I am getting a JWT token from harbor service using the below HTTP call

GET /service/token?service=harbor-registry&scope=repository:devlpc1/nginx:push HTTP/1.1
Host: example.com
Authorization: Basic aGFyYmFkbWluOmFzZHNld2ZlZkAyMzJB

Curl

curl --location 'https://example.com/service/token?service=harbor-registry&scope=repository%3Adevlpc1%2Fnginx%3Apush' \
--header 'Authorization: Basic aGFyYmFkbWluOmFzZHNld2ZlZkAyMzJB'

I can use that JWT as a bearer token in Postman and get a 2xx response. like below

curl --location 'https://example.com/v2/' \
--header 'Authorization: Bearer <jwt>'

But don't know what user should I use for logging to docker cli with this JWT as a password.

0

There are 0 best solutions below