SamKirkland / FTP-Deploy-Action

Deploys a GitHub project to a FTP server using GitHub actions
MIT License
3.93k stars 374 forks source link

##[error]The process '/usr/bin/git' failed with exit code 8 #77

Closed felixhaeberle closed 4 years ago

felixhaeberle commented 4 years ago

Bug Description Deploy does not work because of 'dirty reository', but repository and working tree is clean for sure. Thanks very much in advance for your help.

My Action Config

name: Build and deploy website

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    name: Build and deploy the website
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: shivammathur/setup-php@v2
      with:
        php-version: '7.3'
        tools: composer
    - run: composer install
    - uses: actions/setup-node@v1
      with:
        node-version: '12'
    - run: npm install yarn
    - run: yarn install
    - run: yarn build

    - name: Deploy website with FTP
      uses: SamKirkland/FTP-Deploy-Action@3.1.1
      with:
        ftp-server: ${{ secrets.FTP_URL }} # configure .git-ftp-include
        ftp-username: ${{ secrets.FTP_USER }}
        ftp-password: ${{ secrets.FTP_PASSWORD }}
        local-dir: ./
        git-ftp-args: --dry-run

My Action Log

Run SamKirkland/FTP-Deploy-Action@3.1.1
/usr/bin/docker run --name be76dbd73d8ce7b6394db59118b3d4c1ca3832_9ed31a --label be76db --workdir /github/workspace --rm -e INPUT_FTP-SERVER -e INPUT_FTP-USERNAME -e INPUT_FTP-PASSWORD -e INPUT_LOCAL-DIR -e INPUT_GIT-FTP-ARGS -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_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -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 -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/talanja/talanja":"/github/workspace" be76db:d73d8ce7b6394db59118b3d4c1ca3832
Uploading files
  /usr/bin/git ftp push --force --auto-init --verbose --syncroot=./ --user=*** --passwd=*** --dry-run ***
  Sun May 24 22:36:21 UTC 2020: git-ftp version 1.5.1 running on Linux 6aa8086bd3cf 5.3.0-1020-azure #21~18.04.1-Ubuntu SMP Wed Apr 15 09:35:56 UTC 2020 x86_64 GNU/Linux
  Sun May 24 22:36:21 UTC 2020: Forced mode enabled.
  Sun May 24 22:36:21 UTC 2020: Auto init if needed.
  Sun May 24 22:36:21 UTC 2020: Using syncroot ./ if exists.
  Sun May 24 22:36:21 UTC 2020: Running dry, won't do anything.
  Sun May 24 22:36:21 UTC 2020: fatal: Dirty repository: Having uncommitted changes. Exiting...
##[error]The process '/usr/bin/git' failed with exit code 8
felixhaeberle commented 4 years ago

Fixed it! After running git reset --hard and having all my included files in .git-ftp-include and having all my excluded files in .git-ftp-exclude it works!

Is there a way to have concurrent users connect to the ftp host? My deployment is very slow because of only one file gets transfered simultaneously. This could be improved, other ftp shells can do concurrent virtual connections/users to send files to the host.

ErikFisherGitHub commented 4 years ago

I have the same problem, may I have a hand?

rod-laycock commented 3 years ago

Same issue here

sbellodev commented 3 years ago

Updated the version in uses: SamKirkland/FTP-Deploy-Action@3.1.1 to uses: SamKirkland/FTP-Deploy-Action@4.0.0

and now works like a charm

mhdizmni commented 1 year ago

You can change uses to uses: SamKirkland/FTP-Deploy-Action@4.3.3 also you have to remove ftp- prefix from server, username and password. it should be working just fine

lmartins commented 1 year ago

@mhdizmni SamKirkland/FTP-Deploy-Action@4.3.3 does not support SFTP which is required by some hosts like WPEngine.

parthardeshana commented 1 year ago

It worked to me as well Thanks also remove -ftp prefix from server, username and password. it worked to me

Cristishor201 commented 1 year ago

same issue. Tried several times, and still this error I get.

Uploading files
  /usr/bin/git ftp push --force --auto-init --verbose --syncroot=./ --user=*** --passwd=***  ***
  Thu Mar  9 [11](https://github.com/Cristishor201/cristishor.net/actions/runs/4337689674/jobs/7652434880#step:4:12):10:41 UTC 2023: git-ftp version 1.6.0 running on Linux c8d71f0b07ff 5.[15](https://github.com/Cristishor201/cristishor.net/actions/runs/4337689674/jobs/7652434880#step:4:16).0-1034-azure #41-Ubuntu SMP Fri Feb 10 19:59:45 UTC 2023 x86_64 GNU/Linux
  Thu Mar  9 11:10:41 UTC 2023: Forced mode enabled.
  Thu Mar  9 11:10:41 UTC 2023: Auto init if needed.
  Thu Mar  9 11:10:41 UTC 2023: Using syncroot ./ if exists.
  Thu Mar  9 11:10:41 UTC 2023: Syncroot is './'.
  Thu Mar  9 11:10:41 UTC 2023: fatal: Not a Git project? Exiting...
Error: The process '/usr/bin/git' failed with exit code 8

I miss something, because I tried both v3.1.1 and v4.0.0 and v4.3.3 and still got exit code 8.

Question: re-runing the failed job, use modified yml or the same one ?

Update

In here it says:

Re-running a workflow or jobs in a workflow uses the same GITHUB_SHA (commit SHA) and GITHUB_REF (Git ref) of the original event that triggered the workflow run.

So it basically says: you need to push everytime you make a change, in order to testing your workflow.

DarrylHardin commented 1 year ago

I updated my file to use v4.3.3 and it still says it's trying to use v3.1.1 and I get the same error.

usakents commented 1 year ago

You can change uses to uses: SamKirkland/FTP-Deploy-Action@4.3.3 also you have to remove ftp- prefix from server, username and password. it should be working just fine

Thanks alot it also worked for me!!!

ankitkaushikx commented 1 year ago

SamKirkland/FTP-Deploy-Action@4.0.0

where do we need to chage the ftp prefix ?