rsync 错误:compat.c(178) 处协议不兼容(代码 2)

rsync 错误:compat.c(178) 处协议不兼容(代码 2)

今天我的 GitHub Action 工作流程突然无法工作,当我遇到 rsync 命令时,显示此错误:

Run AEnterprise/[email protected]
/usr/bin/docker run --name a33c16623b7699cd84934b858311cbdd386ab_beae30 --label 8a33c1 --workdir /github/workspace --rm -e JAVA_HOME_11.0.11_x64 -e JAVA_HOME -e JAVA_HOME_11_0_11_X64 -e DEPLOY_KEY -e ARGS -e SERVER_PORT -e FOLDER -e SERVER_IP -e USERNAME -e SERVER_DESTINATION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true --network github_network_6569d291c303459885993b766ea4e6e0 -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/retire/retire":"/github/workspace" 8a33c1:6623b7699cd84934b858311cbdd386ab
Warning: Permanently added '***' (ECDSA) to the list of known hosts.
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2]

这是我的 GitHub Action 异步部分 ci 脚本:

   - name: Copy jar to Server
      uses: AEnterprise/[email protected]
      env:
        # use pre-configured secret (the private key)
        DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
        ARGS: -avz --delete
        SERVER_PORT: "22"
        # folder to push (./ is the root of current repo)
        FOLDER: ./dolphin-post/dolphin-post-service/build/libs
        SERVER_IP: ${{ secrets.BINGQIAN_HOST }}
        USERNAME: ${{ secrets.BINGQIAN_USER }}
        SERVER_DESTINATION: /opt/apps/dolphin-post
 

为什么突然无法工作,我没有对这个ci脚本做任何改变。我应该做什么来修复它?顺便说一下,我已经多次尝试重新运行 ci 工作流程,但仍然不起作用。

答案1

可能你的~/.bashrc输出是一些echo语句;检查一下。对我来说,这造成了问题。

相关内容