Drone Secrets are not recognized

  • running drone -v = drone version 0.8.0
  • using MacOS
  • I have a repo set as trused in the project settings
  • The following is how I setup the pipline
pipeline:
  build:
    image: node:8.1
    commands:
      - npm install -q
      - npm run lint
  ssh:
    image: appleboy/drone-ssh:latest
    host: devhost.com
    username: itsc
    secrets: [ ssh_key ]
    port: 22
    command_timeout: 180
    script:
      - cd /path/to/app && git pull && npm install && pm2 restart process.json -s
    when:
      status: success
      event: [push]
      branch: dev
  ssh:
    image: appleboy/drone-ssh:latest
    host: prodhost.com
    username: itsc
    secrets: [ ssh_key ]
    port: 22
    command_timeout: 180
    script:
      - cd /path/to/app && git pull && npm install && pm2 restart process.json -s
    when:
      status: success
      event: [push]
      branch: master
  • I added the secret as follows:
drone secret add --repository User/Repo --image appleboy/drone-ssh --name ssh_key --value @/path/to/private_ssh_key

The build works fine but when I get to the ssh part I get the following error
Error: can't connect without a private SSH key or password

I have no Idea if I’m missing anything here … please help

See http://docs.drone.io/secrets-not-working/ for help common issues and solutions. If you still need help, please provide all requested items specified in http://docs.drone.io/secrets-not-working/#still-having-trouble

Also please include your drone server version number.