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

相关推荐
wangruofeng9 小时前
7.1 万 Star 的 MinerU,把 PDF 变成 LLM 能读懂的 Markdown
github
wangruofeng10 小时前
75k Star 的 OCR 传奇——Tesseract 的 40 年,从 HP 实验室到 LSTM 神经网络
github
逛逛GitHub12 小时前
又挖到 3 个不错的 GitHub 项目,尤其是第 2 个。
github
逛逛GitHub13 小时前
GitHub 上 13 万星的爬虫神器,不要 API Key 就能用了。
github
辉的技术笔记14 小时前
Dify 自部署为什么跑不动?6 层瓶颈诊断法教你定位
docker
一点一木20 小时前
🚀 2026 年 6 月 GitHub 十大热门项目排行榜 🔥
人工智能·github
程序员老赵1 天前
Docker 部署 Redmine:老牌开源项目管理部署实测记录
docker·开源·团队管理
程序员老赵2 天前
服务器文件不想 SFTP 上传?Docker 跑个 File Browser,浏览器就能管理
服务器·docker·开源
OpenTiny社区2 天前
从零开发 AI 聊天页要两周?试试这款 Vue3 垂直对话组件库 TinyRobot,直接开箱即用
前端·vue.js·github
逛逛GitHub2 天前
2 万多 Star!Google 开源了这个神级 GitHub 项目。
github