首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从命令行登录到heroku docker注册表

从命令行登录到heroku docker注册表
EN

Stack Overflow用户
提问于 2020-10-29 17:22:41
回答 1查看 492关注 0票数 5

我正在尝试登录registory.heroku.com,以便可以推送我自己的图像,但我在身份验证方面遇到了问题。如果我遵循guidance from the docs,我会得到如下结果:

代码语言:javascript
复制
> 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生成一个令牌,并使用生成的令牌作为密码,则登录将被拒绝:

代码语言:javascript
复制
) 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上运行,并且我希望通过环境变量对其进行配置。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-05-25 14:23:47

我遇到了同样的问题,结果我使用的是令牌的id,而不是实际的令牌,使用heroku authorizations:info <token_id>来获取令牌。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64588163

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档