# ERROR: Command errored out with exit status 128: git clone --filter=blob:none 'https://github.com/user/private-repo.git' /tmp/pip-req-build-xxxxx. Check the logs for full command output.

- **ID:** `pip/git-clone-authentication-failure`
- **Domain:** pip
- **Category:** auth_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

Pip failed to clone a private Git repository because the user has not provided valid authentication credentials (e.g., SSH key, personal access token, or password) for the remote Git server.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 21.0+ | active | — | — |
| Git 2.30+ | active | — | — |
| Python 3.10 | active | — | — |

## Workarounds

1. **Use a personal access token in the URL: pip install git+https://<token>@github.com/user/private-repo.git** (90% success)
   ```
   Use a personal access token in the URL: pip install git+https://<token>@github.com/user/private-repo.git
   ```
2. **Configure SSH key and use SSH URL: pip install git+ssh://git@github.com/user/private-repo.git** (85% success)
   ```
   Configure SSH key and use SSH URL: pip install git+ssh://git@github.com/user/private-repo.git
   ```
3. **Clone the repo manually first, then install from local path: git clone https://github.com/user/private-repo.git /tmp/repo && pip install /tmp/repo** (95% success)
   ```
   Clone the repo manually first, then install from local path: git clone https://github.com/user/private-repo.git /tmp/repo && pip install /tmp/repo
   ```

## Dead Ends

- **Using https:// URL without credentials and expecting cached credentials to work** — Git credential caching may be expired or misconfigured, and pip does not prompt for credentials interactively in non-TTY environments. (50% fail)
- **Setting git config --global http.proxy incorrectly** — Wrong proxy settings can cause authentication to be routed incorrectly or block the connection entirely. (30% fail)
- **Using sudo pip install with a personal SSH key** — Running pip as root changes the SSH agent context, often losing access to the user's SSH keys. (60% fail)
