tar: empty archive when scp a dir to a windows server path with chinese charactor on gitea act_runner with bookworm docker
YujiaCheng1996 opened this issue · comments
YujiaCheng1996 commented
my action:
- run: pwd
- run: mkdir dist
- run: cp index.html dist
- run: ls -al ./dist
- name: Get dist directory
shell: bash
id: get-dist-dir
run: |
echo "$(pwd)/dist"
echo "DIST_DIR=$(pwd)/dist" >> $GITHUB_OUTPUT
- name: Upload dist
uses: appleboy/scp-action@v0.1.4
with:
host: '192.168.10.xxx'
username: 'administrator'
port: '22'
key: '${{ secrets.SSHKEY }}'
debug: true
rm: true
source: '${{ steps.get-dist-dir.outputs.DIST_DIR }}'
target: E:\中文路径\
result:
The runner is gitea act_runner (docker) and ran in node:latest-bookworm.
The remote is a windows server 2008 with Win32-OpenSSH.
This shell command works fine in local windows11 builtin powershell terminal.
scp -r dist theremoteserveralias:E:\中文路径\
Your ssh-action dosen't work on the same server as well.
However,the windows server only accepts cmd command and there is no 'tar' present.
I already tried source: 'dist'
and source: './dist'
, didn't work. So I make sure it gets a non-empty full path.