appleboy / drone-scp

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

error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain #142

Open roimdev opened 1 year ago

roimdev commented 1 year ago

settting

steps:
  - name: scp files
    image: appleboy/drone-scp
    pull: if-not-exists
    volumes: # 
      - name: file-scp
        path: /app/build
    settings:
      host:
        from_secret: host
      username:
        from_secret: username
      key:
        from_secret: key
      port:
        from_secret: port
      target: /app/shell/share-web
      source: build.sh
      command_timeout: 2m
      script:
        - cd /app/shell
        - chmod +x build.sh
        - sh build.sh
volumes: 
  - name: file-scp
    host:
      path: /home/centos/app/build

console log

tar all files into /tmp/872159610/tJAPMyIfHx.tar
scp file to server.
drone-scp error:  error copy file to dest: ******, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

2022/11/30 07:25:19 error copy file to dest: ******, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
OrangGeeGee commented 1 year ago

I'm bumping against the same thing, post back if you've figured it out please.

cyberb commented 1 year ago

interesting, I had the same issue and changing this:

image: "appleboy/drone-scp:1.6.2",

to

image: "appleboy/drone-scp",

helped

waflessnet commented 1 year ago

@cyberb i changed
from

image: "appleboy/drone-scp"

to

image: "appleboy/drone-scp:1.6.2",

thanks, work.

then last not work