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

相关推荐
谷子熟了3 分钟前
电商智能客服系统本地搭建
经验分享·docker·typescript·ai编程·llama
cooldream200911 分钟前
Docker Desktop 安装与配置全流程指南(含 WSL2、汉化与问题排查)
运维·docker·容器
Andytoms42 分钟前
小桔调研:3分钟Docker搭建问卷系统
运维·docker·容器
小周技术驿站1 小时前
Docker服务详解
运维·docker·容器
zh_xuan1 小时前
把Android Library 上传到github并在工程中引用该远程仓库
android·github·远程仓库
盖丽男1 小时前
使用 GitHub Actions 自动打包 Android APK
android·github
七颗糖很甜1 小时前
预警!超级厄尔尼诺即将登场:2026-2027年全球气候或迎“极端狂暴模式”
java·大数据·python·算法·github
张小凡vip2 小时前
Docker安装EFK日志系统完整指南
运维·docker·容器·efk
立莹Sir4 小时前
商品中台架构设计与技术落地实践——基于Spring Cloud微服务体系的完整解决方案
分布式·后端·spring cloud·docker·容器·架构·kubernetes
zhensherlock4 小时前
Protocol Launcher 系列:Working Copy 文件操作与高级命令详解
javascript·git·typescript·node.js·自动化·github·js