I'm trying to log in to registory.heroku.com so that I can push my own images, but I'm having issues authenticating. If I follow the guidance from the docs, I get this:
> docker login --username=_ --password=(heroku auth:token) registry.heroku.com 2077ms Thu 29 Oct 09:15:57 2020
› Warning: token will expire 05/07/2021
› Use heroku authorizations:create to generate a long-term token
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
So it wants me to use a long-term token. If I generate one using heroku authorization:create
, and use the generated token as the password then the login is rejected:
) docker login --username=_ --password="this is a token" registry.heroku.com 1140ms Thu 29 Oct 09:21:23 2020
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: login attempt to https://registry.heroku.com/v2/ failed with status: 401 Unauthorized
Do I need to set a scope on the long term token to get this to work? I want to use long-term tokens as the process is going to be running on CI and I want to configure it via environment variables.
I faced the same problem, turns out I was using the id of the token not the actual token, use heroku authorizations:info <token_id>
to get the token.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With