It seems add_host field not work. I got log message error Error logging in to v2 endpoint, trying next endpoint: Get https://harbor.edu.com/v2/: dial tcp: lookup harbor.edu.com on 127.0.0.11:53: no such host. Below is my partial .drone.yaml file:
This plugin exposes the --add-host option for the docker build command. The error message you posted indicates the docker login command is failing; please note that docker login does not have an --add-host option (see below) therefore one should not expect --add-host to have any impact on login.
$ docker login --help
Usage: docker login [OPTIONS] [SERVER]
Log in to a Docker registry.
If no server is specified, the default is defined by the daemon.
-p, --password string Password
--password-stdin Take the password from stdin
-u, --username string Username