我正在尝试登录registory.heroku.com,以便可以推送我自己的图像,但我在身份验证方面遇到了问题。如果我遵循guidance from the docs,我会得到如下结果:
> 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所以它想让我使用一个长期令牌。如果我使用heroku authorization:create生成一个令牌,并使用生成的令牌作为密码,则登录将被拒绝:
) 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我是否需要在长期令牌上设置作用域才能使其正常工作?我希望使用长期令牌,因为进程将在CI上运行,并且我希望通过环境变量对其进行配置。
发布于 2021-05-25 14:23:47
我遇到了同样的问题,结果我使用的是令牌的id,而不是实际的令牌,使用heroku authorizations:info <token_id>来获取令牌。
https://stackoverflow.com/questions/64588163
复制相似问题