# Drone Secrets are not recognized

**URL:** <https://drone.discourse.group/t/drone-secrets-are-not-recognized/6070>\
**Category:** Drone Support\
**Created:** [January 10, 2018, 10:59pm UTC](https://drone.discourse.group/t/drone-secrets-are-not-recognized/6070 "2018-01-10T22:59:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ygilany](https://avatars.discourse-cdn.com/v4/letter/y/8dc957/32.png) [@Ygilany](https://drone.discourse.group/u/Ygilany)\
**Post date:** [January 10, 2018, 10:59pm UTC](https://drone.discourse.group/t/drone-secrets-are-not-recognized/6070/1 "2018-01-10T22:59:44Z")

</div>

- 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

```auto
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:

```auto
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

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [January 10, 2018, 11:56pm UTC](https://drone.discourse.group/t/drone-secrets-are-not-recognized/6070/2 "2018-01-10T23:56:25Z")

</div>

See [http://docs.drone.io/secrets-not-working/](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](http://docs.drone.io/secrets-not-working/#still-having-trouble)

Also please include your drone server version number.
