---
title: "Code mirrors"
url: "/help/buuk/mirror"
updated: "2026-10-25T16:58:19.085Z"
---
# Code mirrors

A mirror is a cloned Git repository Buuk can read. It handles any Git host: GitHub, GitLab, Gitea and other self-hosted git servers, a bare repo path, an S3 bucket holding a checkout, or a local path on the server. Unlike the GitHub integration there is no OAuth handshake, so private and self-hosted infrastructure works the same as hosted repos.

Open **Integrations** and pick **Mirror**, or go straight to the **Mirrors** page in the dashboard and press **Connect mirror**.

## How connecting works

1. **Name the repo and paste the clone URL**
   Choose a source type — GitHub, GitLab, Gitea, bare, S3, or a local path — pick the branch (`main` unless you change it), and paste the clone URL. Private repos take credentials in the connect form.

2. **Buuk clones and starts a full scan**
   The first scan is queued automatically. A badge on the mirror card shows the state: `pending`, `synced`, or `error`.

3. **Browse and rescan**
   **Browse** opens the mirrored file tree so you can check what Buuk sees. Press **Scan** anytime to queue a fresh pass after the code moves.

## What a scan produces

A scan turns the repository into draft docs: generated article drafts built from the repo’s structure, with the source symbols they came from attached. They appear in the [Suggestions](./suggested-updates) queue as material to accept, edit, or dismiss. Nothing from a mirror reaches the public site on its own.

The mirrored files themselves become searchable AI context. Buuk also extracts symbols and design tokens from the code, which drafts can reference when they explain how a feature actually works.

## Plan

Mirrors are limited per plan, separate from the integration slots. Hitting the cap returns a clear `mirror limit` error with an upgrade path rather than a silent failure.

## Troubleshooting

**The clone failed or sits in error**

Check the clone URL first, then the credentials — private repos need a token that can read. A wrong branch name also fails quietly, so confirm the branch exists on the repo.

**The mirror limit error appears**

You are at your plan’s mirror count. Remove a mirror you no longer need or upgrade, then connect again.

## Related

- The OAuth-based GitHub flow: [GitHub](./github).
- Other codebase sources: [Confluence, Google Drive, and Databricks](./confluence-and-google-drive).
- Reviewing mirror drafts: [Suggested updates](./suggested-updates).
- How drafts become articles: [Write and publish an article](./write-and-publish-an-article).