actions / checkout

Action for checking out a repo
https://github.com/features/actions
MIT License
5.89k stars 1.74k forks source link

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

Open arhue opened 3 years ago

arhue commented 3 years ago

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

richardxia commented 3 years ago

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 commented 3 years ago

Doesn't appear to be fixed for me ☹️

arhue commented 3 years ago

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 commented 3 years ago

I'm having the same issue

samueltadros commented 3 years ago

same issue here

samueltadros commented 3 years ago

did anyone reached a solution?

jjzazuet commented 3 years ago

Same here. Thanks!

barthalion commented 3 years ago

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 commented 3 years ago

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?

progzilla commented 3 years ago

Same problem too. Just getting this now

jayconscious commented 3 years ago

How to solve this problem?

bboles commented 3 years ago

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 commented 3 years ago

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

meadowsys commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

bboles commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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?

paresy commented 3 years ago

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

rfprod commented 3 years ago

same here https://github.com/rfprod/nx-ng-starter/runs/2593668512

however, premerge was successful just recently https://github.com/rfprod/nx-ng-starter/runs/2593478731

gat-bryszard commented 3 years ago

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.

mik639 commented 3 years ago

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

Ifycode commented 3 years ago

Thank you @mik639 I was wondering why checkout action for my latest push seem not to be successful. I'm wondering what "incident" means here though.

D4nte commented 3 years ago

Same issue here: https://github.com/status-im/js-waku/runs/2593777765 despite the incident marked as resolved.

adityalolla commented 3 years ago

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

barthalion commented 3 years ago

Commenting "same here" is not helpful to anyone.

jcasilla-mahi commented 3 years ago

We were facing this issue too, generating a new access token for git solved the issue, not sure why that would be neccesary

jeacott1 commented 3 years ago

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

pdolinic commented 3 years ago

Error in CLI is thrown, but the repo appears to be created.

LebedevRI commented 3 years ago

I'm not sure if everyone here is having the same issue, but i just had a similar issue, and for me the solution was to explicitly apt-get install ca-certificates.

LeoWang1991 commented 3 years ago

so any solution to solve this issue?

jjzajdel commented 3 years ago

I'm having the same issue when I try to create a repository from a template. Any solutions?

mebtte commented 3 years ago

same issue.

NitikaKuhar commented 3 years ago
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/main*:refs/remotes/origin/main* +refs/tags/main*:refs/tags/main*
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/<org>/<repo 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 --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/main*:refs/remotes/origin/main* +refs/tags/main*:refs/tags/main*
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/<org>/<repo name>/' not found not found
  The process '/usr/bin/git' failed with exit code 128
  Waiting 18 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/main*:refs/remotes/origin/main* +refs/tags/main*:refs/tags/main*
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/<org>/<repo name>/' not found' not found
  Error: The process '/usr/bin/git' failed with exit code 128

Getting the same issue, how to fix it?

Alkaidcc commented 3 years ago

same issue.

lil5 commented 3 years ago

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.

stardustman commented 3 years ago

same issue, how to fix it ? checkout private repo using self-hosted github runner.

3CordGuy commented 3 years ago

Same issue. Not a private repo.

stardustman commented 3 years ago

Same issue. Not a private repo.

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

rubiagatra commented 3 years ago

So it is fixed then? maybe can try @arhue?

n0ur-sh commented 3 years ago

I faced it today in my CD pipeline noting that the CI pipeline has the same block to checkout with the same version and is still working fine.

sumukhjoglekar commented 3 years ago

We are also facing the issue with our private repos. The CI are not working. Is it fixed now? remote: Repository not found. The process '/usr/bin/git' failed with exit code 128

nautatva commented 3 years ago

Even a simple config didn't work. the repo I am trying to checkout is public.

      - name: Checkout repo
        uses: actions/checkout@v2
        with: 
          repository: 'projects-by-theNB/thenb.in'
          path: 'dist'
nshamaa commented 3 years ago

Is there an expected time for this issue to be resolved? Can we do anything to help? is there a workaround / alternative for the checkout action?

Thank you.

stardustman commented 3 years ago

Even a simple config didn't work. the repo I am trying to checkout is public.

      - name: Checkout repo
        uses: actions/checkout@v2
        with: 
          repository: 'projects-by-theNB/thenb.in'
          path: 'dist'

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

hoanghapham commented 3 years ago

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

nautatva commented 3 years ago

Upgrading to v2.3.4 didn't work

Even a simple config didn't work. the repo I am trying to checkout is public.

      - name: Checkout repo
        uses: actions/checkout@v2
        with: 
          repository: 'projects-by-theNB/thenb.in'
          path: 'dist'

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

EB1TR commented 3 years ago

Same issue... BUT...

In my case firewall filter too agressive... Check if the firewall implements hard rules or black lists. The IP 140.82.121.3 (GitHub) is in the FireHOL L3 (http://iplists.firehol.org/) causing many messages.