# Incorrect Usage: bad flag syntax when adding secret ssh key as a string

**URL:** https://drone.discourse.group/t/incorrect-usage-bad-flag-syntax-when-adding-secret-ssh-key-as-a-string/10320
**Category:** Drone Support
**Created:** [September 10, 2019, 5:55am UTC](https://drone.discourse.group/t/incorrect-usage-bad-flag-syntax-when-adding-secret-ssh-key-as-a-string/10320 "2019-09-10T05:55:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cminor](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/cminor/32/5556_2.png) [@cminor](https://drone.discourse.group/u/cminor)
#### Post date: [September 10, 2019, 5:55am UTC](https://drone.discourse.group/t/incorrect-usage-bad-flag-syntax-when-adding-secret-ssh-key-as-a-string/10320/1 "2019-09-10T05:55:01Z")

</div>

Hello,

I’m trying to use drone/cli (as a docker container) to add an SSH key as organization secret using:

```
docker run --rm -e DRONE_SERVER=<host> -e DRONE_TOKEN=<token> drone/cli:latest orgsecret add <org> <keyname> <private_ssh_key_single_line>

```

However, I’m receiving the following error: `Incorrect Usage: bad flag syntax`. This is due to the fact the key starts with `-----BEGIN RSA PRIVATE KEY-----` and I assume drone/cli complains about `--`. How can I overcome this issue? I tried quoting the values but still can’t make it work. Of course I could create a file with the key, share it within the container, then import it with @ syntax but I would like to avoid all those steps.

---

<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: [September 11, 2019, 4:17pm UTC](https://drone.discourse.group/t/incorrect-usage-bad-flag-syntax-when-adding-secret-ssh-key-as-a-string/10320/2 "2019-09-11T16:17:39Z")

</div>

The recommended solution would be to use the `@` syntax to load the file. If you want to pass the value as a command line parameter you will need to figure out the correct quoting. I am sure it is possible, but probably will require some trial and error.
