appleboy / drone-scp

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

1.0.0-rc.1 missing ssh config (Host, Username) #84

Closed weisd closed 5 years ago

weisd commented 5 years ago

when I use drone 1.0.0-rc.1, the yml config is

- name: scp
  image: appleboy/drone-scp
  host: "xxx.xxx.xxx.xxx"
  port: 22
  target: /path/to
  source: test
  username: drone
  secrets: [ ssh_password ]

then I got the error

missing ssh config (Host, Username)
appleboy commented 5 years ago

I will test the new drone version asap.

replicant0wnz commented 5 years ago

Invalid yaml, should look like this

- name: push
  image: appleboy/drone-scp
  settings:
    host: xxx
    username: drone
    ssh_key:
      from_secret: drone
    source: dist
    target: /home/drone/dist
appleboy commented 5 years ago

@weisd Please try the @replicant0wnz solution.

yiranzai commented 5 years ago

@appleboy
@replicant0wnz I have encountered this error I use drone 1.0.0-rc.5, the yml config is

- name: deploy
  image: appleboy/drone-scp
  when:
    status:
    - success
  settings:
    host:
      from_secret: deploy_host
    port:
      from_secret: deploy_port
    key:
      from_secret: deploy_rsa
    username:
      from_secret: deploy_username
    target:
      from_secret: web_path
    source: public
    strip_components: 1

then I got the same error

missing ssh config (Host, Username)
appleboy commented 5 years ago

Please try the plain text like below:

  - name: scp
    image: appleboy/drone-scp
    pull: true
    settings:
      host: example.com
      username: deploy
      key:
        from_secret: deploy_key
      target: /home/deploy/gobento
      rm: true
      source:
        - release/*
        - Dockerfile
        - docker-compose.yml