> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replo.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshoot Git

> Resolve authentication, repository access, scope, rate-limit, and local dev server errors.

If you connected through the MCP, run `GIT_TERMINAL_PROMPT=0 git ls-remote <clone_url>` first.
If it prints `could not read Username`, `could not read Password`, or
`Git authentication failed`, call
`create_api_key` with `type: "user"` (or create a user key in Settings → Account → Git) and store the new credential as the
`local-development` skill describes. Your client reads that skill through the
Replo MCP server's `skills` tool.
For a network error, retry when connected. For a permission error, check your
workspace role; a viewer can clone and pull but cannot push.
The environment-variable checks below apply to manual API-key setup.

Match the line returned by `git.replo.app`, then check the credential, replo-git URL, scope, or retry window.

An expired key returns `Git authentication failed: your Replo API key has expired.`
The same message appears during clone, pull and push. Create a new key in Settings (a user key for a coding agent under
**Account** > **Git**, a project key for CI under **Workspace** > **API Keys**), with MCP
`create_api_key`, or with API `POST /v1/api-keys`.
Replace the stored credential and retry. See the
[authentication reference](https://docs.replo.app/git/manual-setup) for the required fields.

| Remote response | What it means | What to do |
| - | - | - |
| `Git authentication failed: the Replo API key is invalid or revoked.` | Git received a Replo API key, but the key is incomplete, revoked, expired, or otherwise not valid. | Check that the full key was copied and that it is not revoked in **Settings** > **Account** > **Git** (or **API Keys** for a project key); expired keys no longer appear there. If it is revoked, expired, or lost, create a new key with `repo.read` for clone or `repo.write` for push, then retry. |
| `Git authentication failed` with setup instructions | Git sent no usable credential, such as an empty password from the credential helper, or a value that is not a Replo API key. | Confirm that `REPLO_API_KEY` is exported and contains the full `replo_sk_` key; see **Git does not use the Basic credential helper** below. If the key is revoked or lost, create a new one. Then retry with Basic or Bearer authentication. |
| `Repository not found.` | The repository is missing, or the key cannot access the project or requested Git service. Replo uses one response for both cases. | Find the replo-git URL again under **Settings** > **Account** > **Git**. Check the selected project, the key creator's current role, and `repo.read` for clone or `repo.write` for push. |
| `Can't push with this API key.` | The key was created by someone who is now a workspace Viewer. Viewers can clone and pull but not push. | Ask a workspace Owner to change that person's role to Member in **Settings** > **Members**, or push with a key created by a Member or Owner. |
| `Git authentication failure rate limit exceeded. Retry after N seconds.` | Too many failed credentials came from the same IP address. | Stop retrying, fix the credential, and wait for the `Retry-After` interval. |
| `Git project request rate limit exceeded. Retry after N seconds.` | The project request budget is exhausted. | Wait for the `Retry-After` interval before sending another request. |

> [accordion] Clone works but push returns Repository not found
>
> Create a key with `repo.write` for that project. A key with only `repo.read`
> cannot read push ref advertisements and receives the same
> `Repository not found.` response.

> [accordion] Git does not use the Basic credential helper
>
> Confirm that the host-scoped helper exists:
>
> ```bash theme={null}
> git config --global --get-all credential.https://git.replo.app.helper
> ```
>
> Git runs the helper as a child process, so `REPLO_API_KEY` must be exported
> in the shell that runs Git, not just set. Check without printing the key:
>
> ```bash theme={null}
> sh -c 'test -n "$REPLO_API_KEY"' && echo "REPLO_API_KEY is exported"
> ```
>
> If nothing prints, run `export REPLO_API_KEY="replo_sk_..."`, or load your
> key file with `set -a; source replo.env; set +a`. If another credential
> manager supplies an old credential first, rerun the helper setup in
> [Manual Git setup](https://docs.replo.app/git/manual-setup): its empty first helper stops other
> managers from answering for `git.replo.app`.
>
> The `git config --global credential.helper replo` line in the remote
> response applies only when Git runs inside Replo's own sandbox. On your own
> machine or in CI, configure the API key helper in the **Configure
> authentication** step of [Manual Git setup](https://docs.replo.app/git/manual-setup).

&#x20;

> [accordion] Bearer authentication prompts for a username
>
> Upgrade to Git 2.46 or later before using the `authtype` helper. On older Git
> versions, use the Basic helper. Do not put the bearer value in
> `http.extraHeader` on the command line because other processes can read it
> from Git's arguments.

&#x20;

> [accordion] A key stopped working after a role change
>
> API keys follow the creator's current Replo access. Restore the creator's
> project access, or ask a workspace administrator with access to create a new
> key.

> [accordion] An API key was exposed
>
> Revoke the key in **Settings** > **Account** > **Git** (or **API Keys** for a project key) immediately. Create a
> replacement with the narrowest required scopes, update the secret in your
> shell or CI system, and remove the exposed value from logs and shell history.
> If a local dev server ran while the key was exported, also follow
> [Remove an existing local development cache](https://docs.replo.app/sdk/install.md#remove-an-existing-local-development-cache).

## Run the cloned site locally

Keep the Git-only API key out of the dev-server environment:

```bash theme={null}
env -u REPLO_API_KEY pnpm install
env -u REPLO_API_KEY pnpm dev
```

The parent shell keeps the key for later Git commands. Use the prefix each time
you launch the dev server, including after a restart.

See [Working on the site locally](https://docs.replo.app/sdk/install.md#working-on-the-site-locally) for
the full setup, including how to remove an existing local development cache.

> [accordion] The webpack dev server is Ready but every route returns 404 on macOS
>
> This applies when you run `next dev --webpack`. Check the dev server output
> for `Watchpack Error (watcher): Error: EMFILE: too many open files, watch`.
> Webpack's native file watcher failed, so Next.js treats your source folders
> as missing and serves only its 404 page. Stop the dev server, then restart
> it from the cloned site folder with polling:
>
> ```bash theme={null}
> env -u REPLO_API_KEY WATCHPACK_POLLING=true pnpm exec next dev --webpack
> ```
>
> Polling picks up edits a few seconds later than native watching, so turn it
> on only when you see this error. The error affects only your local dev
> server, not your published site.

## Still stuck?

Contact [support@replo.app](mailto:support@replo.app) and include:

* The exact remote response.
* Your replo-git URL without any credentials.
* Whether you use Basic or Bearer authentication.
* Your Git version.
* Whether the operation is clone, pull, or push.

Never send the API key.

> [card] [Configure Git authentication](https://docs.replo.app/git/manual-setup)
>
> Create a scoped key and configure Basic or Bearer authentication.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.