I’ve been losing my hair trying to push a built docker image to my private registry.
I’m running drone 1.1 (server + agent), from the official docker images.
the config.json credentials are never exposed to your pipeline, and are therefore not exposed to any plugins, including the docker plugin. Plugins are completely independent entities. If you want to pass sensitive data to plugins such as credentials, you need to use secrets.
you can manage secrets in the repository settings screen in drone, and then reference them in your plugin configuration. There is an example in the plugin documentation at http://plugins.drone.io/drone-plugins/drone-docker/
Error authenticating: exit status 1 could indicate the credentials passed to drone are incorrect. It could also indicate a networking issue from inside the container not being able to reach the registry server. Also note that providing the full logs can sometimes help us debug.
Unfortunately Docker does not tell us why login failed, to my knowledge. So there is no way to get more detailed information from Docker. You could check your registry server to see if there is anything in the logs that might be helpful.
the only other possible root cause I am aware of, which is very uncommon, is the inability to start docker (docker-in-docker) inside the plugin container. This happens sometimes if the host machine docker daemon is using the devicemapper storage driver or has some special security policy that prevents --privileged containers. But again, this is very uncommon.