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

相关推荐
赤生云电竞4 小时前
网吧无盘系统上云:PXE 与云桌面混合部署实践 —— 基于iPXE、iSCSI与NVIDIA vGPU的架构选型
架构·github
爱嘿嘿的小黑4 小时前
用 Google Antigravity 踩遍登录和环境坑后,我开源了个 30 秒只读体检脚本 + Agent Skill
人工智能·python·github
逛逛GitHub5 小时前
7 天 Star 增长超 1000 的新 GitHub 项目,这一波质量很高。
github
CoderYanger5 小时前
Java EE 进阶:16. Spring原理(第一弹)
java·服务器·数据库·后端·spring·java-ee·github
Meaauf7 小时前
Registry私有容器镜像仓库搭建
docker·容器·registry
always20228 小时前
AI Infra · 02 - AI 感知的任务调度:Gang Scheduling、拓扑感知与潮汐弹性
人工智能·docker·kubernetes
徐小夕10 小时前
JitKnow 5.0发布:让AI知识库变成可组装的知识中台
前端·vue.js·github
Monkey的自我迭代11 小时前
K8S详细学习1——为什么选择k8s
学习·docker·kubernetes
zjeweler12 小时前
Nginx 502 Bad Gateway怎么解决?Docker反代与PHP-FPM报错全链路排查
nginx·docker·php-fpm·502 bad gateway·实用建站
钱栈up14 小时前
GitHub 热榜实测|sherlock 环境部署实录
python·开源·github