Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
arhue opened this issue Jan 6, 2021 · 109 comments
Open

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

arhue opened this issue Jan 6, 2021 · 109 comments

Comments

@arhue
Copy link

arhue commented Jan 6, 2021

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: ad-m/github-push-action#76

@richardxia
Copy link

We also experienced a similar issue yesterday in one of our private repositories:

  /usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +COMMIT_HASH:refs/remotes/pull/PULL_REQUEST_NUMBER/merge
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/sifive/REPOSITORY_NAME/' not found
  The process '/usr/bin/git' failed with exit code 128
  Waiting 12 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/* +COMMIT_HASH:refs/remotes/pull/PULL_REQUEST_NUMBER/merge
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/sifive/REPOSITORY_NAME/' not found
  The process '/usr/bin/git' failed with exit code 128
  Waiting 16 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/* +COMMIT_HASH:refs/remotes/pull/PULL_REQUEST_NUMBER/merge
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/sifive/REPOSITORY_NAME/' not found
  Error: The process '/usr/bin/git' failed with exit code 128

This happened at around Jan 5, 2021, 7:05 PM PST. The issue seems to have gone away now, but I just wanted to add some extra information in case if it's useful.

@arhue
Copy link
Author

arhue commented Jan 7, 2021

Doesn't appear to be fixed for me ☹️

@arhue
Copy link
Author

arhue commented Jan 7, 2021

Without ref: master this is the output:


Run actions/checkout@v2
  with:
    repository: tectonic/infrastructure-helm
    token: ***
    path: infrastructure-helm
    fetch-depth: 0
    ssh-strict: true
    persist-credentials: true
    clean: true
    lfs: false
    submodules: false
  env:
    XDG_DATA_HOME: /root/.local/share
    KUBECONFIG: /root/kubeconfig
    AWS_DEFAULT_REGION: eu-central-1
    AWS_REGION: eu-central-1
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
/usr/bin/docker exec  391d5591308f1b002e6fa53e803efc54eab81186507cdf92652262f21b79d9ef 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
Determining the default branch
  Retrieving the default branch name
  Not Found
  Waiting 13 seconds before trying again
  Retrieving the default branch name
  Not Found
  Waiting 17 seconds before trying again
  Retrieving the default branch name
  Error: Not Found

@CFlaniganMide
Copy link

I'm having the same issue

@samueltadros
Copy link

same issue here

@samueltadros
Copy link

did anyone reached a solution?

@jjzazuet
Copy link

jjzazuet commented Feb 6, 2021

Same here. Thanks!

@barthalion
Copy link

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.

@sgore-godaddy
Copy link

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?

@purpose-driven-engineer

Same problem too. Just getting this now

@jayconscious
Copy link

How to solve this problem?

@bboles
Copy link

bboles commented Mar 12, 2021

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.

@NachoNorris
Copy link

same issue here folks, and also used PAT as a workaround 👍🏼

@meadowsys
Copy link

meadowsys commented Mar 31, 2021

mine is weirder hah

checkout completes successfully but produces an annotation, and clicking the annotation brings me to the logs page but doesn't focus any logs. looking at the logs, all looks normal

EDIT: nevermind, mine is a problem that is my fault, disregard

@MartinNowak
Copy link

MartinNowak commented Apr 7, 2021

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:

Same issue here for tokens generated for schedule, workflow_dispatch, and issue_comment triggered runs. Tokens issued for pull_request triggered runs worked fine.

@jeacott1
Copy link

jeacott1 commented Apr 9, 2021

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

@bboles
Copy link

bboles commented Apr 10, 2021

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.

@pavelloz
Copy link

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...

@jeacott1
Copy link

according to similar error in fisheye docs
https://confluence.atlassian.com/fishkb/non-zero-exit-code-128-error-executing-command-unable-to-find-remote-helper-for-http-305759561.html

"This ERROR is caused when you have an Environment Variable called GIT_EXEC_PATH."

@pavelloz
Copy link

Hmm. Following this trail i found https://www.xspdf.com/resolution/59948454.html which seems like an aggregation of different forums threads about it. And it seems like error 128 can mean a lot of diferent things, including wrong SSH keys.
Maybe SSH keys are not propagated correctly from the GHA to Checkout action?

@actions actions deleted a comment May 6, 2021
@actions actions deleted a comment May 6, 2021
@actions actions deleted a comment May 6, 2021
@actions actions deleted a comment May 6, 2021
@actions actions deleted a comment May 6, 2021
@actions actions deleted a comment May 6, 2021
@actions actions deleted a comment May 6, 2021
@actions actions deleted a comment from meadowsys May 6, 2021
@leoherbie
Copy link

No idea why but I was suddenly forced to use an access token to checkout this repo:

runs-on: ubuntu-latest
steps:
  - uses: actions/checkout@v4
    with:
      token: ${{ secrets.GH_TOKEN }}

@Willibaur
Copy link

Willibaur commented Jun 3, 2024

Hi there

I'm facing this issue since this morning, but in my case I use gh cli instead of checkout action, I've tested the same command with the same token locally and it works fine. The same token is used in many other repos within the organisation and they are working fine.
Any idea why is this happening out of nowhere❓

Note

gh repo clone my-repo -- --branch 'main'

@ydimovprism
Copy link

If it is a call callable workflow add

secrets: inherit  

example:

jobs:  
  callable-workflow.:    
    name: Callable Workflow
    uses: ./.github/workflows/callable-workflow.yml
    with:
      input: production
    secrets: inherit  

this worked for me, thank you!

@fullstackzach
Copy link

I added the "contents: read" scope to permissions: and that did the trick for me.

jobs:
  deploy-prod:
    name: deploy-prod
    permissions:
      actions: write
      contents: read
    steps:
      - uses: actions/checkout@v4

@rsrini7
Copy link

rsrini7 commented Aug 3, 2024

Only works with permissions: write-all

@iamstarlee
Copy link

It looks like a permission issue. After adding the following snipppet of code, my code works well now.
permissions: id-token: write contents: read

peter-ein pushed a commit to fpm-git/apm-agent-nodejs that referenced this issue Aug 20, 2024
Earlier in elastic#3180 we added max-parallel:15 as an attempted workaround
errors in the "actions/checkout@v2" (elastic#3179). We also changed to
"actions/checkout@v3" in that change.
actions/checkout#417 suggests that the update
to v3 is sufficient to fix, so let's get the parallelism back.

Refs: elastic#3179
@jukbot
Copy link

jukbot commented Sep 26, 2024

confirmed that after adding the following to action file is working fine.

permissions:
  id-token: write
  contents: read

@bidur0123
Copy link

maybe this can help image

This worked for me! thanks!

@tomgwasira
Copy link

maybe this can help image

This worked for me! thanks!

Worked for me as well, but what does it do and is there a way to do it in the yml file for the specific repository?

@mccabe-david
Copy link

Permissions error for me in the .yml file

@radvansky-tomas
Copy link

radvansky-tomas commented Dec 20, 2024

That just started happening to my self-hosted runner, everything worked fine even without PAT token present.
Now it happens, I've added PAT, added permissions, checked settings. Using 2 different machines. Latest OSX

Cleaning the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
/usr/bin/git sparse-checkout disable
/usr/bin/git config --local --unset-all extensions.worktreeConfig
Checking out the ref
  /usr/bin/git checkout --progress --force -B develop refs/remotes/origin/develop
  Switched to a new branch 'develop'
  branch 'develop' set up to track 'origin/develop'.
Error: The process '/usr/bin/git' failed with exit code 128

Same action works fine in cloud based runner

@radvansky-tomas
Copy link

Ok, mine is resolved. Issue related to new Xcode 16.2 cmd tools and that git version. I reinstalled git using brew and it works magically again

JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
JoshLafleur added a commit to concordia-fsae/firmware that referenced this issue Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests