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

相关推荐
Re_Virtual1 小时前
基于web的轻量级http测试工具——Restfox
http·docker·开源·restfox
极客先躯5 小时前
高级java每日一道面试题-2026年04月18日-实战篇[Docker]-如何处理金融行业的时序数据容器化?
java·运维·docker·容器·金融·时序数据·高级面试
love530love6 小时前
ComfyUI 插件发布 GitHub Release + Comfy Registry (官方节点商店)完整复盘教程(从零开始)
人工智能·windows·github·devops
杨了个杨89826 小时前
docker的网络模式
网络·docker·容器
Zhu7588 小时前
对docker环境的postgresql数据库做快速初始化
数据库·docker·postgresql
CoderJia程序员甲8 小时前
GitHub 热榜项目 - 周榜(2026-07-18)
ai·大模型·llm·github·ai教程
杨浦老苏8 小时前
实测2.8MB的Rust笔记服务:MinimaMemosa部署教程
笔记·docker·群晖
spider_xcxc8 小时前
docker-compose.yaml 是“开发/测试环境”的利器,而 Kubernetes 配置是“生产环境”的标准。
docker·容器·kubernetes
AA陈超9 小时前
006 T03 — 蓝图操作指南
c++·游戏·架构·ue5·github·虚幻引擎
chen_ke_hao10 小时前
K8s 高可用集群部署
java·docker·kubernetes