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这个网页目前是用不了的!

相关推荐
HashTang7 分钟前
用自然语言驱动的开源 3D 建筑设计编辑器-Aedifex
前端·github·ai编程
kobe_OKOK_27 分钟前
S7 adapter Docker run
运维·docker·容器
一个欠登儿程序员34 分钟前
在国产服务器上通过 Docker 部署 Windows 虚拟机
服务器·windows·docker
星渊澈41 分钟前
从github上git clone 比较慢,如何解决。。
git·github
Hadoop_Liang2 小时前
构建Spring Boot项目Docker镜像
spring boot·后端·docker
陪我去看海2 小时前
JueJin-MCP:让AI帮你一键发布掘金文章
github
Learn-Python3 小时前
修改docker容器内文件后让其生效
运维·docker·容器
赵丙双4 小时前
docker restart 策略
docker·restart
工具罗某人4 小时前
docker实现redis-cluster模式集群部署
java·redis·docker
AI成长日志5 小时前
【GitHub开源项目】推理优化技术栈全览:从PyTorch到专用引擎
pytorch·开源·github