The process '/usr/bin/git' failed with exit code 128 CI/CD Origin: Build & delivery Last updated 12 Oct 2026

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

A git command inside the workflow failed — usually authentication to a private repo/submodule, a missing ref, or pushing without permission.

Exact message you may see The process '/usr/bin/git' failed with exit code 128failed with exit code 128git failed with exit code 128
Seen on: GitHub Actions

Meaning

Exit code 128 is git’s generic fatal error; the lines above show the reason: “Repository not found”, “could not read Username”, “couldn't find remote ref” or “Permission denied”.

Common causes

  • Private submodule/repo needs a token or SSH key
  • Branch/tag doesn’t exist (wrong ref)
  • Push without contents: write
  • Shallow clone missing history (fetch-depth)

⚡ Quick fix

  1. Read the git error above the exit code
  2. Pass token/ssh-key to actions/checkout for private submodules
  3. Set fetch-depth: 0 when history/tags are needed

Detailed fix by platform

YAML

  1. yaml
    - uses: actions/checkout@v4
      with:
        submodules: recursive
        token: ${{ secrets.SUBMODULES_PAT }}
        fetch-depth: 0

How to diagnose

  1. Message — Git error line
  2. Repo — Private?
  3. Ref — Exists?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

couldn't find remote ref (checkout) — GitHub Actions: fatal: couldn't find remote ref refs/heads/feature — The process '/usr/bin/git' failed with exit code 1 (actions/checkout) (CI/CD)couldn't find remote …github-actions[bot] 403 — remote: Permission to owner/repo.git denied to github-actions[bot]. fatal: unable to access … The requested URL returned error: 403 (Git)github-actions[bot] 4…npm git dependency error — npm ERR! code 128 — An unknown git error occurred (git dependency install) (npm)npm git dependency er…Process completed with exit code 1 — GitHub Actions: Error: Process completed with exit code 1. (CI/CD)Process completed wit…publickey — Git: Permission denied (publickey). fatal: Could not read from remote repository. (Git)publickeyRepository not found — remote: Repository not found. fatal: repository 'https://github.com/x/y.git/' not found (Git)Repository not foundResource not accessible by integration — GitHub Actions: Error: Resource not accessible by integration (403) (CI/CD)Resource not accessib…TF401019 — TF401019: The Git repository with name or identifier x does not exist or you do not have permissions for the operation (Azure)TF401019The proce…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.