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

  • 5,000
  • Tác giả: admin
  • Ngày đăng:
  • Lượt xem: 5
  • Tình trạng: Còn hàng

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:///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:///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:///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 vĩ đại have gone away now, but I just wanted vĩ đại add some extra information in case if it's useful.

Doesn't appear vĩ đại be fixed for bu ☹️

boisde, u0324020, shamprasadrh, webB1an, ksumit-nitp, dibrinsofor, whyhugo, ezzcodeezzlife, kueter, UdhavPawar, and 8 more reacted with thumbs up emoji

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 mặc định branch
  Retrieving the mặc định branch name
  Not Found
  Waiting 13 seconds before trying again
  Retrieving the mặc định branch name
  Not Found
  Waiting 17 seconds before trying again
  Retrieving the mặc định branch name
  Error: Not Found

I'm having the same issue

did anyone reached a solution?

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

We were facing the same issue in private repos.
We changed vĩ đại one version older release and that seems vĩ đại work.

We changed it to:

   - uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675

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

What is root cause though?

Same problem too. Just getting this now

How vĩ đại solve this problem?

jayconscious, rogeriopeixotocx, tegorov, NachoNorris, himanshuupadhyay102, tanabalu, antaljanosbenjamin, simer27, AnnoyinngD, svandek, and 139 more reacted with eyes emoji

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 lập cập that the checkout action uses by mặc định was not working. We were able vĩ đại 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 over 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 tự better error reporting in this case and also kiểm tra the validity of the token before doing any privileged operations.

MartinNowak, qalesson, TaylorHo, bradfox2, nuhkoca, ryomoro, Golden-Black, xiaolianguu, alexandru93p, prein, and 2 more reacted with thumbs up emoji

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

mine is weirder hah

checkout completes successfully but produces an annotation, and clicking the annotation brings bu vĩ đại 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

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 lập cập that the checkout action uses by mặc định was not working. We were able vĩ đại 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.

saw this today too. is it just bu or is github looking and behaving more lượt thích microsoft devops everyday?

jankapunkt, f-giftagram, Jonas-Juvet, tersam-95, 3kh0Unblocker23, katzy687, alka2, tuanvayn, smakosh, wenmoonsir, and 8 more reacted with thumbs up emoji radiomix, jmurillo9, julio8a, carswipdev, richpauloo, cassiotbatista, acemasterjb, akashagarwal7, tuanvayn, TomasMocek, and 9 more reacted with laugh emoji

I have had a tư vấn 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 vĩ đại be merged vĩ đại address this. They would not share any further details regarding the nature of the fix or a timeline for it vĩ đại be merged/released.

I get this error when trying vĩ đại update docker container with testcafe vĩ đại lập cập the tests on. There is no error when it comes vĩ đại containers... but git throws in this action. Extremely weird and blocking...

Hmm. Following this trail i found https://www.xspdf.com/resolution/59948454.html which seems lượt thích an aggregation of different forums threads about it. And it seems lượt thích error 128 can mean a lot of diferent things, including wrong SSH keys.
Maybe SSH keys are not propagated correctly from the GHA vĩ đại Checkout action?

I also facing the same issue

Facing same issue on Private Repo

Facing the same issue on private repo with [self hosted]

Hi Everyone, Today I got Same Problem Which i found earlier 😑😑, Which I didn't remembered Until i find out my comment 😅😅

I am deploying Blazor Webassembly Project using github action (public Repository / not private)

This is My Current Configuration

The Work Around I found Out is it is Missing Enviroment Variable

  1. Got vĩ đại /settings/environments
  2. Click On New Enviroment
  3. Named it as github-pages
  4. Inside Enviroment Here is how i Configured

Hoping guys this help you also.

Work Flow File

name: deployandpublish

on:
  push:
    branches: [ "master" ] 

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup .NET
      uses: actions/setup-dotnet@v2
      with:
        dotnet-version: 8.0.x
        
    # Install dotnet wasm buildtools workload
    - name: Install .NET WASM Build Tools
      run: dotnet workload install wasm-tools
      run: dotnet publish Challenge.csproj -c Release -o release --nologo
      run: sed -i 's///g' release/wwwroot/index.html
    
 
    - name: copy index.html vĩ đại 404.html
      run: cp release/wwwroot/index.html release/wwwroot/404.html

    # (Allow files and folders starting with an underscore)
    - name: Add .nojekyll file
      run: touch release/wwwroot/.nojekyll
      
    - name: Commit wwwroot vĩ đại GitHub Pages
      uses: JamesIves/[email protected]
      with:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        BRANCH: gh-pages
        FOLDER: release/wwwroot	

Facing same issue with my private repo

If you are using any token vĩ đại write for auth, you potentially may be preventing the read with your gh token. The fix above created a new token and phối it and it worked.

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

`
on:
push:
branches:
- main
workflow_dispatch:

permissions:
id-token: write
contents: read

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

@blgorman slightly out of topic ,
to supported multiline code in github is
three backtick i.e. ``` then code then three backtick ```

thankyou for your help

Facing same issue using this workflow:(it was working before)


on:
    push:
        branches:
    workflow_dispatch:

jobs:
    lint:
        name: lint, type-check and test
        runs-on: ubuntu-latest

        steps:
            - name: Install SSH key
              uses: shimataro/ssh-key-action@v2
              with:
                  key: ${{ secrets.GH_SSH_KEY }}
                  name: id_rsa
                  known_hosts: ${{ secrets.KWOWN_HOSTS }}

            - name: Checkout
              uses: actions/checkout@v3

            - name: Setup Node.js
              uses: actions/setup-node@v3
              with:
                  node-version: '18'

            - name: Get yarn cache directory path
              id: yarn-cache-dir-path
              run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

            - uses: actions/cache@v3
              id: yarn-cache
              with:
                  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
                  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
                  restore-keys: |
                      ${{ runner.os }}-yarn-

            - name: Install dependencies
              run: yarn install

            - name: Run ESLint
              run: yarn lint

            - name: Run type-check
              run: yarn typescript

            # - name: Run tests
            #   run: yarn test

still no one resolve this yet ??

No idea why but I was suddenly forced vĩ đại use an access token vĩ đại checkout this repo:

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

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'

If it is a Hotline callable workflow add

example:

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

this worked for bu, thank you!

I added the "contents: read" scope vĩ đại permissions: and that did the trick for bu.

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

Only works with permissions: write-all

It looks lượt thích a permission issue. After adding the following snipppet of code, my code works well now.
permissions: id-token: write contents: read

fpm-peter pushed a commit vĩ đại fpm-git/apm-agent-nodejs that referenced this issue

Aug trăng tròn, 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 vĩ đại fix, so sánh let's get the parallelism back.

Refs: elastic#3179

confirmed that after adding the following vĩ đại action tệp tin is working fine.

permissions:
  id-token: write
  contents: read

maybe this can help

This worked for me! thanks!

maybe this can help

This worked for me! thanks!

Worked for bu as well, but what does it tự and is there a way vĩ đại tự it in the yml tệp tin for the specific repository?