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

相关推荐
逛逛GitHub3 小时前
民间大神移植《GTA 6》进度已经到 90% 了,这几个 GitHub 项目关注一下
github
AR-26710-5 小时前
docker Day6——容器数据卷
运维·docker·容器
解道Jdon5 小时前
Rust重写OpenCode Rune:性能提升最高100倍
ide·windows·git·svn·eclipse·github·visual studio
AR-26710-7 小时前
docker Day5——改动+systemf复习
运维·docker·容器
徐小夕7 小时前
从 RAG 工具到文档处理平台,聊聊 LlamaIndex 为什么成了 AI 应用的标配底座
前端·vue.js·github
jasmine02448 小时前
GitHub 开源背单词游戏:四六级考研词库,拼写正确就能攻击
游戏·github·工具类
钱栈up11 小时前
GitHub 热榜上手|OpenMausBot:一周+7077星的本地 Agent 聊天客户端
typescript·开源·github
秋千易1 天前
同一提交,旧基线红、新基线绿:基线放行了门禁
github
csdn_aspnet1 天前
使用 Docker 配置 PostgreSQL 和 pgAdmin 4
数据库·docker·postgresql·pgadmin4