appleboy / drone-scp

Copy files and artifacts via SSH using a binary, docker or Drone CI.
MIT License
142 stars 30 forks source link

drone-scp not working with --key-path #76

Closed vishal24tuniki closed 4 years ago

vishal24tuniki commented 6 years ago
drone-scp --host 34.xxx.xxx.91 --port 22 --username ubuntu --key-path "${HOME}/.ssh/key.pem" --target /home/ubuntu --source deploy.tmpl --timeout 10s`
2017/11/03 15:09:25 tar all files into /tmp/331781469/VBtvx7d9oB.tar
2017/11/03 15:09:25 34.227.159.91: scp file to server.
2017/11/03 15:09:27 34.227.159.91: create folder /home/ubuntu
drone-scp error:  ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

But when i do

ssh-add "${HOME}/.ssh/key.pem"
drone-scp --host 34.xxx.xxx.91 --port 22 --username ubuntu --target /home/ubuntu --source deploy.tmpl --timeout 10s
2017/11/03 15:08:25 tar all files into /tmp/249787007/nFrDL398Mw.tar
2017/11/03 15:08:25 34.227.159.91: scp file to server.
2017/11/03 15:08:29 34.227.159.91: create folder /home/ubuntu
2017/11/03 15:08:32 34.227.159.91: untar file nFrDL398Mw.tar
2017/11/03 15:08:36 34.227.159.91: remove file nFrDL398Mw.tar

It works

vishal24tuniki commented 6 years ago

@appleboy pls help

vishal24tuniki commented 6 years ago

Hey @appleboy, did u get a chance to look at the issue?

appleboy commented 4 years ago

@vishal24tuniki Please try the latest version.