Skip to main content
A mirror is a synced, read-optimized copy of a GitHub repository, hosted on Entire’s Git network in the region you choose. Use the CLI when you want to create a mirror from the terminal, script mirror setup, or immediately configure Git remotes. For the web flow, see Mirrors in Entire.io.

Before you start

Make sure you have:

Log in

Log in with the Entire CLI:
entire login
Confirm that your login is active:
entire auth status

Create the mirror

Run the create command with no arguments:
entire repo mirror create
Entire lists the GitHub repositories you can mirror, then prompts you to select repositories and regions. Each repository is mirrored into every region you select, and Entire creates the mirrors in parallel:
Select repos to mirror
Space to select, enter to confirm.

> [•] <owner>/<repo>

Select regions to mirror into
Each repo is mirrored into every selected region.

> [•] us-east (us)
  [•] eu-west (eu)

REPO            REGION        STATUS  CLONE URL
<owner>/<repo>  us-east (us)  ready   entire://aws-us-east-2.entire.io/gh/<owner>/<repo>
<owner>/<repo>  eu-west (eu)  ready   entire://aws-eu-central-1.entire.io/gh/<owner>/<repo>
This registers the mirrors on Entire. It does not change any local Git checkout.

Script the mirror creation

To create a mirror without prompts, pass the repository, and optionally the region’s cluster host, as arguments:
export GH_OWNER="<owner>"
export GH_REPO="<repo>"

entire repo mirror create "github.com/$GH_OWNER/$GH_REPO" aws-us-east-2.entire.io
The repository can be written as owner/repo, an HTTPS GitHub URL, or an SSH GitHub URL. If you omit the cluster host, an interactive terminal prompts you to pick a region; non-interactive runs default to aws-us-east-2.entire.io. To mirror into more than one region from a script, run the command once per cluster host. The command waits until the initial clone from GitHub is available, then prints the mirror URL:
Registered mirror <mirror-id>
  entire://aws-us-east-2.entire.io/gh/<owner>/<repo>
  cloning. ready
Creating a mirror is idempotent for a given repository and region: rerunning the command returns the existing mirror. To return as soon as the mirror is registered instead of waiting for the initial clone, pass --no-wait.

Use the mirror with Git

To clone the mirror into a new checkout, use the URL printed by entire repo mirror create:
git clone "entire://aws-us-east-2.entire.io/gh/$GH_OWNER/$GH_REPO"
From an existing clone of the GitHub repository, point the local origin remote at the mirror:
cd "$GH_REPO"
git remote get-url origin
git remote set-url origin "entire://aws-us-east-2.entire.io/gh/$GH_OWNER/$GH_REPO"
git fetch origin
If you want to verify the mirror before changing the checkout’s primary remote, add it temporarily as another remote:
cd "$GH_REPO"
git remote add entire "entire://aws-us-east-2.entire.io/gh/$GH_OWNER/$GH_REPO"
git fetch entire
These commands only update your local .git/config. They do not create or delete the server-side mirror.

Push through the mirror

Push to the configured remote with normal Git commands:
git push -u origin <branch>
Entire forwards the push through the mirror to the upstream GitHub repository. Your GitHub write access, branch protection rules, and required checks still apply.

Push an unmirrored branch

Branches whose names start with entire/unmirrored/ are never forwarded to GitHub. The branch stays in the mirror’s Entire region, so pushes to it are not subject to GitHub’s push rate limits. See Unmirrored branches for when to use them. Create and push an unmirrored branch with normal Git commands:
git switch -c "entire/unmirrored/<branch>"
git push -u origin "entire/unmirrored/<branch>"
When you want the work on GitHub, push the same commits to a branch name outside the prefix:
git push origin "entire/unmirrored/<branch>:<branch>"
Entire does not currently back up unmirrored branches, and they are not available on GitHub or from mirrors in other regions. Keep a copy of any work you cannot afford to lose on a mirrored branch or on GitHub.

Remove the mirror

When you no longer need the mirror, remove the server-side mirror placement:
entire repo mirror remove "github.com/$GH_OWNER/$GH_REPO"
Removing a mirror does not delete or rewrite the GitHub repository. It also does not change any local Git remotes you configured in .git/config.

Continue with

Mirror a GitHub Repository

Follow the end-to-end tutorial for creating, cloning, pushing through, and restoring a mirror.

Mirrors in Entire.io

Configure GitHub access and choose repositories from the web app.

Mirror Access and Permissions

Understand GitHub-synced access, hourly collaborator sync, and offboarding.

Troubleshooting

Fix missing repositories, app access, clone, fetch, and push issues.