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

相关推荐
关关长语2 小时前
Wsl解决MySQL容器跨域权限问题
mysql·docker·容器
dong_junshuai2 小时前
每天一个开源项目#43 KTransformers:18.5K星的异构MoE推理引擎
github
IT小辉同学4 小时前
# Milvus v3.0-beta docker-compose 启动失败完整排错教程
docker·eureka·milvus
OpenTiny社区5 小时前
TinyRobot v0.5.0 新版本强在哪?
前端·vue.js·github
humbinal7 小时前
同时支持 gui & cli 的 parquet 文件查看工具,高性能小清新!
hive·python·rust·spark·开源·github·parquet
华科大胡子7 小时前
GitHub Actions 自动化运维实战:从入门到精通
github
fliter10 小时前
不用再反复 stash:用 Git Worktree 同时开发多个分支
后端·github
Tenifs11 小时前
在 VS Code 中,你可以通过修改全局或项目目录下的 settings.json 文件来彻底关闭 GitHub Copilot
github·copilot
暖和_白开水11 小时前
数据分析agent 四:docker qdrant 镜像拉取,和教程
docker·数据挖掘·数据分析
Cosolar12 小时前
深入理解 AI Agent:设计原理与工程实践
人工智能·面试·github