add Mount key from file path

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2017-10-30 09:44:57 +08:00
parent 6f1ace35bf
commit f79c2bc257
2 changed files with 23 additions and 0 deletions

View File

@ -50,3 +50,26 @@ docker run --rm \
-w $(pwd) \
appleboy/drone-ssh
```
## Mount key from file path
Please make sure that enable the `trusted` mode in project setting.
![trusted mode](./screenshot/trust.png)
Mount private key in `volumes` setting of `.drone.yml` config
```diff
pipeline:
ssh:
image: appleboy/drone-ssh
host: xxxxx.com
username: deploy
+ volumes:
+ - /root/drone_rsa:/root/ssh/drone_rsa
key_path: /root/ssh/drone_rsa
script:
- echo "test ssh"
```
See the detail of [issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928).

BIN
screenshot/trust.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB