0

Today my GitHub Action workflow suddenly could not work, when I run into rsync command, shows this error:

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]

and this is my GitHub Action async part ci script:

   - 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
 

why suddenlly could not work, I did not do any change of this ci script. what should I do to fix it? By the way, I have tried rerun the ci workflow for many times but still not work.

2
  • 2
    Have you reviewed the warning message and its recommended fix? "protocol version mismatch -- is your shell clean?" / "(see the rsync man page for an explanation)" See man rsync and search for is your shell clean for the details Jul 3, 2021 at 12:38
  • try to manually connect to your server: ssh -i <your private key file> <your user>@<yourhost> false. If it returns any output (like any error from a wrong login shell for your newly create user) it won't work
    – Ferrybig
    Apr 1, 2022 at 9:58

1 Answer 1

1

Possibly your ~/.bashrc has some output, such as an echo statement; inspect it. For me, that caused a problem.

3
  • Please edit and expand your answer, to clarify what you mean exactly. It isn't terribly clear, as it currently stands. Feb 8, 2022 at 16:27
  • 1
    @Greenonline I've heard of this as a possibility; see one random example at serverfault.com/a/328404/293440. I've edited the post to make it clearer to me; let me know if you think it can be improved further.
    – Jeff Schaller
    Feb 8, 2022 at 17:49
  • 1
    @JeffSchaller - it's better now after your edit. However, what I meant (I guess) was that if Aleksandr could include an example of such a problematic line, for example the line that he had had in his .bashrc... also, possibly, why did the line appear in the .bashrc? Was it always there? or was it added by the user or some other errant script (recently or around the time that the issue started to manifest itself)? I dunno, just a thought. Feb 8, 2022 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .