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

相关推荐
徐小夕8 小时前
下载量超 30 万的开源智能体 Prime Agent:它把自己从 TypeScript 重写成了 Rust
前端·vue.js·github
miofly10 小时前
GitHub 日榜趋势速报 | 2026-11-05
开源·github
wflynn19 小时前
GitHub 日榜趋势速报 | 2026-11-03
开源·github
u13013020 小时前
GitHub 热榜项目:日榜(2026-11-03)
人工智能·github
工业一体机老司机21 小时前
Docker部署工控机采集服务 Compose编排与开机自启
运维·docker·容器
GoGeekBaird1 天前
别再给每个 AI 做自我介绍了:我做了一个「个人上下文」管理系统
后端·github·agent
莫晓燚1 天前
Ansible 13 个常用模块---企业实战
git·github
miaobinfei1 天前
docker拉取dify镜像,执行docker compose up -d 报错
运维·docker·容器
kobe_OKOK_1 天前
docker compose命名卷 映射到宿主机的路径
运维·docker·容器
程序员柒叔1 天前
Diagram Design 解构:45 种图型如何用语义路由与 SVG 质量门交付
人工智能·github·agent·skills