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

# Git overview

> Clone, pull, and push site code through Replo's Git endpoint.

Replo gives each site a Git repository that you can use from your laptop, CI, or another development environment. Connect through `https://git.replo.app` to inspect site code, make changes, and keep the repository in sync.

## What you can do

* Clone a site's repository to work on it locally.
* Pull changes made in Replo.
* Push commits back to the site repository.
* Read repository refs from CI before running a build or check.

Ask the Replo agent for the site's replo-git URL. The URL identifies the repository but does not contain a credential.

## How authentication works

Use a Replo API key that starts with `replo_sk_`. Git accepts the key in 2 forms:

* **Basic:** Use `token` as the username and the API key as the password. A host-scoped credential helper can supply both values.
* **Bearer:** Send the key in the `Authorization: Bearer` header. This works with Git, CI, and raw HTTP clients.

<Warning>
  Never put an API key in your replo-git URL. URLs can appear in shell history,
  process lists, Git configuration, and CI logs.
</Warning>

## Scopes and permissions

Choose the narrowest scope that covers the work:

| Scope        | Allows                                       |
| ------------ | -------------------------------------------- |
| `repo.read`  | Clone, fetch, pull, and read repository refs |
| `repo.write` | Push commits                                 |

A key only works for the projects selected when it was created. It also follows the key creator's current Replo access. Removing that person's project access stops the key from reaching the project.

Select both scopes when a workflow needs to pull and push.

For privacy, Replo returns the same `Repository not found.` response when a repository is missing or the key cannot access it. A key with only `repo.read` also receives this response when it tries to push.

## Get started

<CardGroup cols={2}>
  <Card title="Connect with Git" icon="code-branch" href="/git/get-started">
    Create a scoped API key, configure authentication, and verify the replo-git
    URL.
  </Card>

  <Card title="Troubleshoot Git" icon="wrench" href="/git/help">
    Resolve authentication, repository access, scope, and rate-limit errors.
  </Card>
</CardGroup>
