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

相关推荐
To_OC1 小时前
跑了3个Docker容器后,我终于搞懂镜像和容器到底啥关系
后端·docker·容器
流量猎手4 小时前
宝塔中更新github
github
tryCbest5 小时前
Docker 从零到精通:知识与跨平台使用指南
docker·容器
开始学AI8 小时前
Codex2API Docker 使用宿主机代理:OAuth Token 兑换 403 问题排查与解决方案
运维·docker·容器
敢敢是只喵i8 小时前
n8n 接入业务系统:如何正确等待一项 Agent 任务?从稳定 request_id、job_id 到超时续查
github
wangruofeng8 小时前
新 Mac 到手先装什么:AI Builder 的 44 款工具,基础层照抄、场景层按需
github·aigc·ai编程
亖十不惑8 小时前
二、Codex Memories 源码解析:记忆的生成、整理与存储
github
面向Google编程8 小时前
GitHub 宕机近 8 小时!一次 sidecar 配置失误,如何放倒全球最大代码平台
github
做前端的娜娜子8 小时前
Docker 常用命令全梳理:从镜像拉取到容器编排
docker·容器·掘金·金石计划
峰向AI9 小时前
Modular 平台:一个人想改写 AI 开发的底层规则
github