appleboy / scp-action

GitHub Action that copy files and artifacts via SSH.
https://github.com/marketplace/actions/scp-command-to-transfer-files
MIT License
1.25k stars 135 forks source link

When copying files from a Linux runner to a Windows server issues #180

Open jjangsky opened 5 months ago

jjangsky commented 5 months ago

Hello, first of all, I would like to express my gratitude for creating such a wonderful custom action.

I am having trouble transferring files from a Linux runner server to a Windows remote server using your scp-action.

After checking the "When copying files from a Linux runner to a Windows server" section at the end of the readme file and executing it the same way, it failed to transfer the files, displaying "remote server os type is unix".

Can you help with this?

- name: Upload WAR file to NCP Windows server
  uses: appleboy/scp-action@master
  with:
    host: ${{ secrets.NCP_SERVER }}
    username: ${{ secrets.NCP_USER }}
    password: ${{ secrets.NCP_PASSWORD }}
    port: 22
    source: target/SCHOOLBOOKS_USER.war
    target: '/c/eco/schoolbooks_tomcats/tomcat9_user_test/webapps/'
    tar_dereference: true
    rm: true
    debug: true
clint-latch commented 3 months ago

For future travelers, drop the leading /c in the target, i.e.

-    target: '/c/Users/bob'
+    target: '/Users/bob'