Search code examples
dockerdocker-registrydockerhub

Unable to push a plugin using docker plugin push command


I am trying to develop a V2 plugin. I am able to to use the 'docker plugin create' and 'docker plugin enable' commands with my plugin configuration. However the 'docker plugin push' command fails with the following error

[root@localhost plugin]# docker plugin push adityadani/pxd-plugin
Error response from daemon: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

Here is my docker version

Client:
 Version:      1.13.0-rc4
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   88862e7
 Built:        Sat Dec 17 01:34:17 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.0-rc4
 API version:  1.25 (minimum version 1.12)
 Go version:   go1.7.3
 Git commit:   88862e7
 Built:        Sat Dec 17 01:34:17 2016
 OS/Arch:      linux/amd64
 Experimental: false

I have made sure that repository exists and I have correct access to it. I am able to push other images but only 'docker plugin push' fails. In debug mode docker spits out this error

DEBU[0228] Calling POST /v1.25/plugins/adityadani/pxd-plugin:latest/push
DEBU[0228] Trying to push adityadani/pxd-plugin to https://registry-1.docker.io v2
DEBU[0229] Error in blobs.Create: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

To double check connectivity with docker registry w.r.t plugin commands I tried

docker plugin install cpuguy83/docker-overlay2-graphdriver-plugin

and it pulls the plugin and installs it fine.

Am I missing something here? Any help would be appreciated.


Solution

  • I just hit this error too.

    Looks like you cannot "docker plugin push" to a repo that was made for a container. When I let the "docker plugin push" create the repo for me, the push succeeds.

    While it was failing for me, I was going in to hub and trying to manually create the repo beforehand. This seems to turn on a "container" repo flag somewhere under the covers which prevents the "docker plugin push" from succeeding. Deleting it and letting "docker plugin push" create it fixed my problem.