所以我想使用来自 GitHub 的 docker 注册表。我做流动:
docker login docker.pkg.github.com --username username
docker build . --tag docker.pkg.github.com/user-name/repo/IMAGENAME:snapshot
docker push docker.pkg.github.com/user-name/repo/IMAGENAME:snapshot
请注意,存储库是私有的,不是我的,但我获得了对它的写访问权。
当我转到包选项卡时,我还可以看到有关如何开始的说明并按照它们进行操作(有点,我一次性标记了 docker 图像)。
但是当我在顶部运行 3 个命令时,我得到以下输出(推送命令失败):
unauthorized: Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:packages'], but your token has only been granted the: [''] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.
当我访问所引用的站点时,只有不相关的令牌什么都没有。
我可以尝试什么或可能导致这种情况的任何想法......?