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

相关推荐
绘梨衣5474 小时前
Docker+FastAPI+MySQL 项目部署报错汇总
mysql·docker·fastapi
百年੭ ᐕ)੭*⁾⁾6 小时前
docker使用neo4j
docker·容器·neo4j
James_WangA7 小时前
我给 AOI 设备装了一个 Agent,然后发现工具注册才是最难写的
架构·github
James_WangA7 小时前
产线上跑 Agent:LLM 挂了不是 500 错误,是停线
架构·github
春风有信8 小时前
【2026.05.01】Windows10安装Docker Desktop 4.71.0.0步骤及问题解决
运维·docker·容器
Hommy8811 小时前
【开源剪映小助手】字幕接口
开源·github·aigc·剪映小助手·视频剪辑自动化
sthnyph13 小时前
docker compose安装redis
redis·docker·容器
一袋米扛几楼9813 小时前
【Git】规范化协作:详解 GitHub 工作流中的 Issue、Branch 与 Pull Request 最佳实践
前端·git·github·issue
W.A委员会13 小时前
Docker基本使用流程
运维·docker·容器
尘埃落定wf14 小时前
# GitHub CLI:告别繁琐的 Git 命令,让开发更高效
git·github