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

相关推荐
昵称为空C9 分钟前
Spring Boot 项目docker分层镜像构建案例
spring boot·ci/cd·docker
kali-Myon14 分钟前
快速解决 Docker 环境中无法打开 gdb 调试窗口以及 tmux 中无法滚动页面内容和无法选中复制的问题
运维·安全·docker·容器·gdb·pwn·tmux
CoderJia程序员甲20 分钟前
GitHub 热榜项目 - 日榜(2025-12-15)
git·ai·开源·llm·github
管理大亨1 小时前
ELK + Redis Docker 企业级部署落地方案
大数据·运维·elk·elasticsearch·docker·jenkins
pblh1232 小时前
基于Docker部署测试PySpark
运维·docker·容器
yBmZlQzJ2 小时前
财运到内网穿透-群晖NAS安装(docker版本)
运维·经验分享·网络协议·docker·容器
知行力2 小时前
【GitHub每日速递 20251215】微软开源12周26课机器学习入门课程,多语言支持还能离线学!
机器学习·开源·github
白学还是没白学?2 小时前
exec db docker from A to B
数据库·docker·容器
WGS.2 小时前
docker run 报错:ImportError: PyCapsule_Import could not import module “datetime“
docker
NZT-482 小时前
服务器访问github受限的解决办法
运维·服务器·github