Drone-cli: plugins "unsupported protocol scheme"

I’m trying to debug kubernetes-secrets with the latest drone v1.0.0-rc.5, there are no errors in logs, so I’m trying to follow your instructions at Drone-vault plugin not quite working but I have the following error using drone-cli latest v1.0.6 rev 7828b24:

$ export DRONE_TOKEN=abcdefg
$ export DRONE_SERVER=http://ci.foo.local
$ drone plugins config get foo-dev/bar-svc
Post : unsupported protocol scheme ""
$ drone plugins secret get foo-drone username --repo foo-dev/bar-svc
Post : unsupported protocol scheme ""

I’ve managed to overcome this with setting DRONE_SECRET_ENDPOINT and DRONE_SECRET_SECRET when running drone-cli. For example with Docker:

kubectl run -it --rm --restart=Never --image=drone/cli:latest drone-cli \
  --env DRONE_SERVER=http://1.2.3.4 \
  --env DRONE_TOKEN=abcdefg \
  --env DRONE_SECRET_ENDPOINT=http://1.2.3.4:3000 \
  --env DRONE_SECRET_SECRET=xxx \
  -- plugins secret get foo-drone username --repo foo-dev/bar-svc

Now I’m getting following error: :confounded:

secrets: cannot find secret username: invalid or missing secret key

Hi Rafi,

The full source code to the CLI is available at: https://github.com/drone/drone-cli which should allow you to triage the issue further.

The first thing I noticed is that you are not providing the CLI with the endpoint of your plugin, which should look something like this:

export DRONE_SECRET_ENDPOINT=http://...
export DRONE_SECRET_SECRET=....
drone plugins config get ...