Docker login: wrong realm returned on 401


I am trying to login into provided docker registry but token authorization is not working since the realm returned in the header is not populated with the domain name.

www-authenticate →Bearer realm=“https://api./auth/v1/token",service="registry2.”

I have changed and hardcoded environment variables in both docker-compose.yml and directly in services.yml, but nothing has changed. (next parameter: BALENA_TOKEN_AUTH_REALM).

Does somebody have any idea what I am doing wrong?

Thank you in advance.


Hey, could you explain a bit about why you’re trying to login to the registry? This isn’t within normal operations, so it would help to understand what your use-case is.

Thank you for quick response. Actually we have two versions of one application, but at the moment one is not yet deployed through balena system. However, we would love to use the same registry if possible.

The hostname not being populated should be fixed if you did git pull in the openBalena repo and then ./scripts compose pull. It is due to a regression introduced in a recent version of the API that has since been fixed and it seems you may be running that version. We have since also pinned components to known-working versions, hence the git pull.