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

相关推荐
xrlfreedom3 小时前
大厂 MCP 面试实录:内部 REST API 封装为可审计 MCP Tools 的落地方案
docker·mcp·提示注入防护
摇滚侠4 小时前
《Docker技术入门与实战 第4版》阅读笔记 2 Docker 镜像
笔记·docker·容器
面包狗AI4S5 小时前
GitHub AI4S 项目观察(2026-08-07—2026-08-13)
人工智能·github
华科大胡子5 小时前
GitHub Actions自动化运维实战技术文章大纲
github
云原生指北5 小时前
Docker Sandboxes 工作区怎么接:Direct、Clone 和它们的边界
git·docker·agent
fthux6 小时前
装闭 RenoPit 源码解析(14):Demo模式、健康检查与Docker部署
人工智能·ai·开源·github·open source·renopit
TunerT_TQ6 小时前
Meta React 源码静态评测:从 4540 个源文件看 React Compiler 的工程化演进
meta·开源·github
玉宇夕落7 小时前
Docker + Nginx + Node.js 容器化部署 —— 从零到一理解反向代理与容器化原理
docker
峰向AI7 小时前
再也不怕换工具失忆了:它给 AI 编程助手装上"长期记忆"
github
ly76898 小时前
Docker 从入门到实践:镜像、容器、Dockerfile 与 Docker Compose 详解
运维·docker·容器