更新时间:2023-02-09 13:35:00
尝试
$ curl -H "Accept: application/vnd.docker.distribution.manifest.v2+json" 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:waisbrot/wait:pull' -H "Authorization: Basic ${username_password_base64}"
背景:这个论坛链接正在讨论同样的问题。
Background: This forum link is discussing the same issue.
问题是服务器选择的默认内容类型是 application / vnd.docker.distribution.manifest.v1 + prettyjws
(v1版本),您需要v2清单。因此,您需要将接受
标头设置为 application / vnd.docker.distribution.manifest.v2 + json
。
The problem is that the default content-type being selected by the server is application/vnd.docker.distribution.manifest.v1+prettyjws
(a v1 manifest) and you need to v2 manifest. Therefore, you need to set the Accept
header to application/vnd.docker.distribution.manifest.v2+json
.