Git mirrors

Configure a Git mirror

Creates a mirror and queues its first sync. requestId makes retries idempotent and expectedVersion must be 0 for a new mirror; 202 is an admission receipt, not sync completion. Requires authenticated authority and enforces current resource policy.

post/api/repos/{owner}/{repo}/mirrors/

Request

  • Base URL
    https://git.cafe
  • Auth
    • API key in cookie gc-session
    • or HTTP bearer
    • or HTTP basic
    • or HTTP token
    • or OAuth 2
      Authorization code: /api/oauth/authorize
      Token URL: /api/oauth/token scopes: repo:metadata:write, repo:contents:write

Path parameters

ownerstring required
repostring required

Request body

requestIdstring uuid required
expectedVersioninteger required
urlstring required
localRefstring required
remoteRefstring required
direction'push' | 'pull' | 'bidirectional' required
conflictWinner'gitcafe' | 'remote'
intervalMinutesinteger
maxPackBytesinteger

Response

Response for status 202

jobIdstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.