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 小时前
github教程之多人协作
github
笨笨狗吞噬者3 小时前
IRIS: shell 中的智能实时输入提示工具
github·shell
wsad05324 小时前
Docker 网络故障排查记:当 bridge 模式失效时,host 模式如何救场
运维·docker·容器
张毅2004-10-104 小时前
docker详解:安装docker,docker架构,docker镜像、容器、网络、存储,容器监控,容器日志,综合实验
linux·运维·docker·云原生·云计算
营养充电站4 小时前
C++23 新特性在 CLion 中的实战体验
macos·docker·jupyter·正则表达式
文优4 小时前
Linux 常用命令速查手册(工作版)
linux·运维·docker
fthux5 小时前
MCP协议开发实战:从零搭建AI Agent工具链
前端·人工智能·ai·开源·github
@CLoudbays_Martin115 小时前
Linux 服务器如何查看是否被植入后门?
linux·服务器·网络·安全·github·ssl
一次旅行5 小时前
Ollama本地私有化大模型完整工程实战
人工智能·机器学习·github