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

Couple of days back this action stopped working.

    - name: Checkout private tools
      uses: actions/checkout@v2
      with:
        repository: tectonic/infrastructure-helm
        token: ${{ secrets.GIT_TECHDEPLOY_TOKEN }}
        path: infrastructure-helm
        fetch-depth: 0
        ref: master
Run actions/checkout@v2
/usr/bin/docker exec  d0faea3798ca7561c881e147e6613d25f75372e481a2c181696cc87de585d470 sh -c "cat /etc/*release | grep ^ID"
Syncing repository: tectonic/infrastructure-helm
Getting Git version info
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/tectonic/infrastructure-helm/' not found
  The process '/usr/bin/git' failed with exit code 128
  Waiting 19 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/tectonic/infrastructure-helm/' not found
  The process '/usr/bin/git' failed with exit code 128
  Waiting 11 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/tectonic/infrastructure-helm/' not found
  Error: The process '/usr/bin/git' failed with exit code 128

Seems similar to this issue: https://github.com/ad-m/github-push-action/issues/76

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 88
  • Comments: 96

Commits related to this issue

Most upvoted comments

How to solve this problem?

I had the same issue after creating another template from a working project. To fix it I had to change Workflow permission through Repo -> Settings -> Actions -> General Set: Read and write permissions Check: Allow Github Actions to create and approve pull requests

maybe this can help image

saw this today too. is it just me or is github looking and behaving more like microsoft devops everyday?

Doesn’t appear to be fixed for me ☹️

maybe this can help image

This worked for me! thanks!

We also ran into this same issue with all workflows using the checkout action on one of private repos. The issue in our case was with the auth token that gets generated for each run that the checkout action uses by default was not working. We were able to workaround the issue by adding our own PAT as a repo secret and having the checkout action use our token instead:

      - uses: actions/checkout@v2
        with:
          lfs: true
          token: ${{ secrets.ACCESS_TOKEN }}

There were not any changes on our end that would have caused this. The issue just seemingly popped up out of nowhere after working without a problem for months.

At the very least the checkout action could do better error reporting in this case and also check the validity of the token before doing any privileged operations.

There is an incident with GitHub actions https://www.githubstatus.com/

We are encountering the same issue at the moment for an action running in a private repository.

I resolve this problem by generate a personal access token.

  1. Your avatar > Settings > Developer settings > Personal access token (Generate a person access token, select scope - workflow)
  2. Repository settings > Secrets > Actions > Repository secrets > Add personal access token to this item.

I had the same issue after creating another template from a working project. To fix it I had to change Workflow permission through Repo -> Settings -> Actions -> General Set: Read and write permissions Check: Allow Github Actions to create and approve pull requests

perfect solve my problem

This one solve it for me too.

Commenting “same here” is not helpful to anyone.

I resolve this problem by generate a personal access token.

  1. Your avatar > Settings > Developer settings > Personal access token (Generate a person access token, select scope - workflow)
  2. Repository settings > Secrets > Actions > Repository secrets > Add personal access token to this item.

Alternatively, set the permissions directly in the relevant wokflow file, e.g.:

jobs:
  job123:
    permissions:
      contents: write

change uses: actions/checkout@v2 to uses: actions/checkout@v2.3.4

worked for me !!!

same as above, this now works for me:


      - name: Checkout code
        uses: actions/checkout@v2.3.4
        with:
          submodules: recursive
          token: ${{ secrets.A_SECRET_TOKEN}}

The token may or may not be necessary, but it was already there.

We were facing the same issue in private repos. We changed to one version older release and that seems to work.

We changed it to:

   - uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675

(which is release 2.3.3 https://github.com/actions/checkout/releases/tag/v2.3.3 )

What is root cause though?

This is still an issue 😦

I fixed this by added this to my run command.

steps:
  - uses: actions/checkout@v2
  - shell: bash
    run: |
      git config user.name "name"
      git config user.email "<>"
      git config push.default "current"
      ./run

This is explained in the README but more attention could be made to it.

If you are using any token to write for auth, you potentially may be preventing the read with your gh token. The fix above created a new token and set it and it worked.

You may first try just putting in the permissions for the workflow, which could also resolve the problem?:

image

` on: push: branches: - main workflow_dispatch:

permissions: id-token: write contents: read

jobs: build-and-deploy: runs-on: ubuntu-latest `

I had the same issue after creating another template from a working project. To fix it I had to change Workflow permission through Repo -> Settings -> Actions -> General Set: Read and write permissions Check: Allow Github Actions to create and approve pull requests

Thanks a lot @realnikolaj !!

I had the same issue after creating another template from a working project. To fix it I had to change Workflow permission through Repo -> Settings -> Actions -> General Set: Read and write permissions Check: Allow Github Actions to create and approve pull requests

perfect solve my problem

As mysteriously the error came, it automatically went away too, seems like some problem on git end? Plugin isn’t updated and nothing else changed.😳

Same issue here : The process ‘/usr/bin/git’ failed with exit code 128 Waiting 10 seconds before trying again

I have had a support case open with Github Support for this since I initially ran into it last month and they reported that there is a pull request currently waiting to be merged to address this. They would not share any further details regarding the nature of the fix or a timeline for it to be merged/released.

I was also Having Same Issue Changing The Checkout Fixed My Issue

  • uses: actions/checkout@v2
    • name: Setup .NET uses: actions/setup-dotnet@v2

Thankyou @bboles

We have this problem on one of our self-hosted Linux runners (version: 2.306.0) and git version 2.41.0: actions/checkout@v3.5.2 fails with

Error: fatal: No url found for submodule path '/path/to/submodule' in .gitmodules
Error: The process '/usr/bin/git' failed with exit code 128

This happens even if the first step is to remove all the files in the workspace directory. I can solve the problem temporary by physically remove the folder from _work.

I had the same issue after creating another template from a working project. To fix it I had to change Workflow permission through Repo -> Settings -> Actions -> General Set: Read and write permissions Check: Allow Github Actions to create and approve pull requests

This worked for me, thanks @realnikolaj

This happens to me when the personal token used by actions/checkout expires.

Great! I solved the problem.

How did you solve it? I’ve tested every solution presented here

Great! I solved the problem.

Has anyone been running into this issue when using act? I’m passing a PAT to act but I get exit code 128.

I was trying to run the following action and getting the same issue:

on: [push]

name: Code Analyzer

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Install wily tool
        run: |
          pip install wily

      - name: Run wily on code changes
        run: |
          wily build .

      - name: Run wily on changed files
        run: |
          for changed_file in {{ steps.files.outputs.all }}; do
            wily diff ${changed_file}
          done

And switching from actions/checkout@v2 -> actions/checkout@v1 fixed my issue and I no longer get the exit code 128. Hope this helps someone.

I have the same problem. Using version 2.3.4 does not help. Mine is a private repo

Same issue. Not a private repo.

I use the actions latest version 2.3.4,then succeed. you can try it.

@jcasilla-mahi my guess is that it wasn’t necessary, but that github resolved whatever issues it had at the same time. - github actions is just kinda flakey, not to mention the pretty horrid user experience driving the thing.

Same here. Action was successful 8 hours ago, now is failing returning Error: fatal: repository 'https://github.com/<owner>/<ourprivaterepo>' not found. We never experienced this before.

I get this error when trying to update docker container with testcafe to run the tests on. There is no error when it comes to containers… but git throws in this action. Extremely weird and blocking…

Seems to be an issue with the token handed out to the CI runner. When I used one generated manually and passed it via with.token, cloning worked fine.