Denied: access forbidden into GitLab Docker registry

GitLab docker registry always returns

denied: access forbidden

I put those 3 lines (according to docs)

registry_external_url ‘https://registry.gitlab.example.com
registry_nginx[‘ssl_certificate’] = “/etc/gitlab/ssl/certificate.pem”
registry_nginx[‘ssl_certificate_key’] = “/etc/gitlab/ssl/certificate.key”

I tested this with and without 2FA enabled (personal auth token)

For those who experiencing similar problems: https://gitlab.com/gitlab-org/gitlab-foss/-/issues/48349