我在获取授权令牌后开始将图像推送到私有docker注册表。但是,由于未经授权的访问,请求失败。没有足够的文档说明这个特定端点所期望的身体参数是什么。有谁能告诉我我做错了什么?
curl -k -v -L -H "Authorization: Bearer ${token}" -X POST "https://***/v2/helloworld/image1/blobs/uploads/"
> Host: ****
> User-Agent: curl/7.43.0
> Accept: */*
> Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlZDWUo6UDdWVjpTS1Q0OlVGNUM6VTVYMjpUR01YOk9QWUs6TTY2Rjo3UkZEOkJTSTI6VVJFSjpFUDMyIn0.eyJpc3MiOiJBdXRoIFNlcnZpY2UiLCJzdWIiOiIiLCJhdWQiOiJEb2NrZXIgcmVnaXN0cnkiLCJleHAiOjE0ODc2NTM2NDgsIm5iZiI6MTQ4NzY1MjczOCwiaWF0IjoxNDg3NjUyNzQ4LCJqdGkiOiI3ODI1ODcwNDY1NDc2Mjg4NzA3IiwiYWNjZXNzIjpbeyJ0eXBlIjoicmVwb3NpdG9yeSIsIm5hbWUiOiJuZXV0cm9uL3JlYWN0aXZlLXByaWNpbmctb2ZmZXJzLWZ1bGZpbGxtZW50IiwiYWN0aW9ucyI6W119XX0.2zQ8GcbLlg26O-dgBQYXMEnOlsDfxonkjy5VhGmq325eDv69C5C28WHiFf6fTLBUNw6YnBv6Ty20ZakuzRPzUHq-C2IVyqMjSymYs_VaaKtRMSCLo-DtVgKL9sSDtWSRd6N2aOk8g5AeQvcs3FaYnE5QQCzho6t79zXd6vUYJV4
>
< HTTP/1.1 401 Unauthorized
< Content-Type: application/json; charset=utf-8
< Date: Tue, 21 Feb 2017 04:57:05 GMT
< Docker-Distribution-Api-Version: registry/2.0
< Server: Apache
< Vary: Accept-Encoding,User-Agent
< Www-Authenticate: Bearer realm="https://****/auth",service="Docker registry",scope="repository:****/****:pull,push",error="insufficient_scope"
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Content-Length: 266
< Connection: keep-alive
<
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Name":"***/***","Action":"pull"},{"Type":"repository","Name":"***/***","Action":"push"}]}]}
注意:我拥有docker存储库的管理员权限
谢谢, 马赫什