Skip to content
GET/repos/{owner}/{name}/mirror

remotes lists each with its role (leader: the remote leads and this repository is its mirror; follower: g1t leads and the remote is kept in step), provider (github, g1t or git), name (github.com/acme/web), state (a mirror is standby, ci, takeover or handing_back; a follower is following or stuck), reachable and unreachable_since, synced_at, last_error and its settings. can_manage says whether you may change them. A mirror standing by is read-only on g1t and runs nothing. Needs read access.

A repository that leads lists its followers instead, each role: follower with state following or stuck. A mirror standing by is read-only on g1t: pushes, merges, issues, pull requests and agents are refused, and nothing runs. reachable is false once the remote’s host has failed three checks over two minutes; by default that is only shown, and nothing happens on its own.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: repository with action mirror, and the same inputs
  • Scope: An access token needs repo:read.
Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.
curl https://api.g1t.sh/repos/acme/web/mirror \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

{
"remotes": [
{
"id": "rmt_01kp4a2b3c4d5e6f7g8h9j0k1m",
"repo_id": "rep_01kp49z8y7x6w5v4t3s2r1q0pn",
"repo": "acme/web",
"provider": "github",
"role": "leader",
"name": "github.com/acme/web",
"url": "https://github.com/acme/web",
"state": "standby",
"state_since": "2026-10-08T13:58:00.000Z",
"state_by": "syntaqx",
"reachable": true,
"unreachable_since": null,
"synced_at": "2026-10-08T13:57:42.000Z",
"last_error": null,
"settings": {
"notify": "banner",
"take_over_after": null,
"hand_back": "when_clean",
"keep_ci_warm": false,
"github_workflows": true,
"hold_deploys": true,
"remote_pushes": "adopt"
},
"created_at": "2026-10-05T10:00:00.000Z"
}
],
"plan": null,
"can_manage": true
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
422 invalid The input is not valid. message says which field and why.