github codespaces推送镜像时unauthorized: access token has insufficient scopes 解决方法

最近有镜像构建的需求,于是就使用了github提供的这个codespace来构建docker镜像,但是在构建后进行镜像推送时提示 unauthorized: access token has insufficient scopes ,如下图

这个一看就知道是权限问题, 这里的access token has insufficient scopes是提示我们当前的访问令牌权限域不足。 github默认的docker镜像仓库是ghcr.io ,这个服务我没有开通, 我需要推送镜像到docker.io, 所以需要退出当前默认登录后重新登陆docker.io仓库。

bash 复制代码
docker logout
# 登录到docker.io仓库
docker login --username=tekintian  docker.io

注意,在codespaces里面使用docker login登录docker.io的时候必须要指定用户名,否则就会变成网页授权登录,而login.docker这个网页目前是用不了的!

相关推荐
日取其半万世不竭5 小时前
用 Portainer 可视化管理 Docker:容器再多也不用背命令了
运维·docker·容器
徐小夕7 小时前
花了一周,3亿tokens,我开源了一款 Word 文档智能审查平台,文稿自动质检+可视化分析,告别低效人工审核
前端·算法·github
weixin_4196583111 小时前
Docker 搭建 Jenkins 服务
java·docker·jenkins
维基框架12 小时前
GitHub重构漏洞赏金计划 向AI批量报告说不
人工智能·重构·github
咖啡星人k12 小时前
【无标题】
前端·ai·github
逛逛GitHub12 小时前
本周 TOP 17 排名的 GitHub 开源项目大盘点,第一个值得收藏。
github
BullSmall14 小时前
Tomcat 部署 Jenkins → Docker Jenkins 完整迁移方案
docker·tomcat·jenkins
DogDaoDao14 小时前
OpenBrowser 深度解析:让 AI 真正「用上」浏览器的自主代理框架
人工智能·程序员·大模型·github·web·ai工具·openbrowser
ruofu3315 小时前
下载nvidia_*_cu13的指令(更新:利用torch 版本拉取相关依赖)
docker·容器
独孤--蝴蝶15 小时前
Docker容器进阶(一)
运维·docker·容器