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

相关推荐
万少21 小时前
我是如何感觉到被时代抛弃的
github
golang学习记1 天前
Go 项目使用docker compose的正确方式
开发语言·docker·golang
汪海游龙1 天前
告别 Play Console 手动上传:从模拟器截图到自动发版的完整流水线
android·ci/cd·github
沫璃染墨1 天前
《从零入门Linux系统篇(十四):系统工具篇·五——Git版本控制:从版本管理到协同开发》
linux·运维·服务器·git·gitee·github
雨声不在1 天前
私有 Docker Registry 排障实录:两个隐蔽的坑
docker·容器
fthux1 天前
装闭 RenoPit 源码解析(02):AI装修闭坑系统数据库与模型设计
人工智能·ai·开源·github·open source·renopit
读书读傻了哟1 天前
解决docker拉取镜像报错failed to resolve reference “docker.io/xxx“...i/o timeout问题
运维·docker·容器
Ai拆代码的曹操1 天前
DaemonSet OnDelete 策略详解:为何 rollout restart 无效及正确迁移方案
docker·容器·kubernetes
瑞码空间1 天前
Web应用的多端部署之道:浏览器 · Electron · Docker
前端·docker·electron·浏览器·web
本地化文档1 天前
skbuild-docs-l10n
python·github·gitcode·sphinx