The process '/usr/bin/git' failed with exit code 128 🔁 CI/CD

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.

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:

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