More private key woes
alicebob opened this issue · comments
Hmmm, these variables are confusing :/
This is with a drone build from master a few hours ago:
I add a id_rsa.pub file as you do in the docs.
I use that in my .drone.yml as (any of these):
key: ${KEY}
key: '${KEY}'
key: "${KEY}"
All of them generate this rsync command:
Port not specified, using default port 22!
$ rsync -az -e 'ssh -p 22 -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o StrictHostKeyChecking=no' /my/build.tgz fileserver@some.server:build/build.tgz ...
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2]
And this from the server:
Mar 30 22:07:23 machine sshd[6388]: Received disconnect from 111.222.111.222: 11: [preauth]
Any idea how to add a private key in the latest drone? Thanks!
(I added this to a closed issue previously.)
Going back to 0.5 solved it. That will have to do.
Were you test-driving Drone 0.6? If so, it's still very unstable.
Until the final changes are known I won't support it in this plugin.
I learned that unstable part the hard way :)
Thanks for the plugin, works good now!
I got this error with drone 0.6.
No private key specified
drone.yml
pipeline:
build:
image: node:latest
commands:
- npm install
deploy-dev:
image: drillster/drone-rsync:latest
hosts: [ "10.10.xx.xx" ]
source: .
target: /opt/www/api
key: ${RSYNC_KEY}
include: [ "node_modules/", ".env" ]
user: root
when:
branch: dev
event: [ push ]
script:
- echo key ${RSYNC_KEY}
my key
$ drone secret info --name RSYNC_KEY --repository xxx/api
RSYNC_KEY
Events: push, tag, deployment
Images: <any>
@koolay Are you running Drone 0.5 or 0.6? Also, please open a separate issue as this one is closed.
@koolay if I can be of some help -using drone 0.6- I made it work adding this where you have key: ${RSYNC_KEY}
:
key: <key>
secrets: [RSYNC_KEY]
@valgreens
Thanks, added secrets: [RSYNC_KEY]
, it is worked now.