appleboy / drone-scp

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

Unable to pass password as secret using drone-scp in drone 0.8.0 version #116

Closed vinodkrishnan1310 closed 1 year ago

vinodkrishnan1310 commented 4 years ago

Below is the snippet of .drone.yml, I am using for drone-scp. I have added secrets SSH_USERNAME,SSH_PASSWORD in Drone UI - Secret section. Please assist here, I am stuck here.

peanut-scp-action:
    image: appleboy/drone-scp
    host: XXXX-XXXXX.XYZ.com
    port: 22
    secrets: [ SSH_USERNAME, SSH_PASSWORD ]
    target: $HOME/xxxxx-prd/
    source: /xxxxxx/src/git.xxxxxx.com/xxxxxxxx/xxxxx/*
    when:
      event: [ push ]
      branch: [ master ]
appleboy commented 4 years ago

@vinodkrishnan1310 What is your drone version? secrets only support drone 0.8 version.

Wxh16144 commented 2 years ago

I had this problem at first, but I used ssh_password and it worked.

You can refer to my configuration

  1. add ssh_password to the runner ui . (must be this name, strictly case-sensitive)

  2. specify docker image version 1.6.3. (preferably)

  3. specify the password in the .drone.yml file.

image

Hope it can help you.

appleboy commented 1 year ago

@Wxh16144 Thanks for your explanation.