repo claim (not the request body).
Basic Usage
With Git Sync (GitHub)
With Git Sync (generic HTTPS Git)
gitea and
forgejo, pass upstream_host:
With Forking
Fork from an existing Code Storage repository:Request Body
Default branch name for the Code Storage repository (defaults to “main”)
Configuration for Git Sync or forking. When omitted, Code Storage creates an empty repository.
BaseRepo for Git Sync
Set to one of
github, gitlab, bitbucket, gitea, forgejo, codeberg, sr.ht, or
sourcehut.Repository owner, namespace, or account name for the external provider.
External repository name.
Upstream repository default branch.
Sync mode operation. Defaults to
"sync" when omitted.Bare hostname for self-hosted providers, such as
git.example.com. Required when the provider has
no built-in default host.For GitHub only, set to
"public" to use unauthenticated public GitHub access.BaseRepo for Forking
Set to
"code" or "code.storage"Ignored for
code.storage providersSource repository URL (name) to fork from
Set to
"fork"Branch or tag name to fork from
Exact commit SHA to fork at (overrides
ref)JWT with
git:read scope for the source repositoryJWT Requirements
- Requires the
repo:writescope for the new repository - For forking,
base_repo.auth.tokenmust havegit:readscope for the source repository
Response
Error Responses
Invalid JWT or missing required scope
Repository already exists or already has an upstream configured
GitHub App configuration is required for authenticated GitHub sync