Skip to content

The process '/usr/bin/git' failed with exit code 128 #690

@jonsage

Description

@jonsage

Workflow using create-pull-request@v3 fails

Recently the create-pull-request action has been failing with:

The process '/usr/bin/git' failed with exit code 128

This is code that was working only a few weeks ago (maybe more recently, but I didn't check over Christmas)...

UPDATE: this is the result of changes between 3.5.2 and 3.6.0 45c510e

GitHub actually provide a further error message within the log:

...

Rebasing commits made to branch 'master' on to base branch 'refs/heads/master' 

/usr/bin/git -c protocol.version=2 fetch --no-tags --progress --no-recurse-submodules --unshallow --force origin refs/heads/master:refs/heads/master

fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository

Steps to reproduce

Not sure, but here is my workflow code that was working when I last used it before Christmas:

name: Check for updated gems
on:
  workflow_dispatch:
  push:
  # 3am Mon-Fri (schedule only runs on default branch)
  schedule:
    - cron: '0 3 * * 1-5'
jobs:
  update:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      # Create a lock file if there isn't one
      # Update the lock file to use latest versions
      # Use same docker environment as build so same version of bundler
      - name: Update gemfile.lock 
        run: |
          docker run \
          -v ${{ github.workspace }}:/srv/jekyll \
          jekyll/jekyll:4 /bin/bash -c "chmod 777 /srv/jekyll && ( chmod 777 Gemfile.lock || true ) && bundle lock && bundle lock --conservative --update"

      - name: Create pull request for any changes
        uses: peter-evans/create-pull-request@v3
        id: cpr
        with:
          branch: update-gems
          delete-branch: true
          base: ${{ github.head_ref || github.ref }}
          title: Update gems
          commit-message: Update gems
          labels: update

      - name: Check outputs
        if: steps.cpr.outputs.pull-request-number
        run: |
          echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"; exit 1;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions