Manage repositories
Open Project → Repositories in the console to see the list. Select a repository to see its status, ID, clone commands when ready, and any available retry action. To delete one, select Delete repository and type its exact display name to confirm.
List and inspect with the API
Section titled “List and inspect with the API”Use a token with repository:read:
GET /v1/projects/{projectId}/repositories?limit=50Authorization: Bearer <token>The response contains repositories and, when there is another page, a
next_cursor. Pass that value as after to continue. limit accepts 1–100
and defaults to 50. Deleted repositories are omitted from the list.
Get one repository, including a deleted repository’s retained record, with:
GET /v1/projects/{projectId}/repositories/{repositoryId}Authorization: Bearer <token>The response wraps the result in repository. It includes the ID, project ID,
name, status, timestamps, and retry; a ready repository also has a
clone_url. A response can include last_error when an operation needs
attention.
| Status | Meaning |
|---|---|
pending | Creation has not been confirmed complete. Wait or follow retry. |
ready | The clone URL is available and Git access can be granted. |
deleting | Deletion is in progress; new Git access is removed. |
deleted | The Git namespace has been logically removed. |
If retry is in_progress, check again later. For retry_create, repeat the
original POST with the same project, idempotency key, and name. For
retry_delete, repeat DELETE for the same repository. If it is
reconciliation_required, contact support before creating a replacement. A
retry value of none needs no action.
Delete
Section titled “Delete”Use a token with repository:write:
DELETE /v1/projects/{projectId}/repositories/{repositoryId}Authorization: Bearer <token>Cloud marks the repository deleting before removing its Git namespace. The
request returns 202 while deletion is pending or 200 when it is complete.
The completed response has status: "deleted" and
deletion_scope: "logical". Repeating DELETE after completion is safe.
Logical deletion confirms that the namespace is gone; it does not guarantee
that every stored object has been physically erased. A pending create whose
outcome cannot be confirmed is not eligible for deletion through this API.
For reading refs, trees, blobs, commits, comparisons, and file commits through the Git data API, see the Git host API documentation. Repository creation and deletion remain Cloud API and console actions. Direct repository creation and deletion on the Git host are not supported for user tokens; use the Cloud API or console.
API full-history import and public sources (rollout pending)
Section titled “API full-history import and public sources (rollout pending)”POST /v1/projects/{projectId}/repositories accepts exactly one creation mode:
{name}creates an empty repository.{name, initialize_from:{repository_id,commit_sha}}copies one tree into a new parentless commit on main; it does not copy source history.{name, import_from:{source}}performs a one-time import of advertised heads/tags and their reachable history, retaining commit IDs and source HEAD/default branch. It never pushes to the source or continuously synchronizes.
source is <source-project-id>/<source-repository-id> or a credential-free public https://... Git URL. Canonical URLs on the configured Cloud Git origin normalize to the internal namespace and use the same mapping and authorization. Internal namespace project and repository IDs must match the current ready Cloud mapping. External v1 rejects URL credentials, query/fragment, non-HTTPS, non-443 ports, private addresses and private OAuth sources; Gitcask pins public DNS addresses, rejects redirects, enforces TLS and bounds transfer. Cloud target CWP/CWT credentials are never forwarded to external sources.
The destination requires current repository:write and a writable target project. Private sources additionally require current repository:read and source-project read access; missing/private sources are 404. public_source defaults false and explicitly publishes the repository as an API copy source, including its reachable history for imports. An authenticated target writer can copy a public source without source membership or an extra repository:read scope. PATCH /v1/projects/{projectId}/repositories/{repositoryId}/public-source with {public_source:true|false} requires a human source owner/admin and repository:write, records an audit event and is revocable. This setting grants no source write/delete and does not enable anonymous Git clone/serving. No existing live source is automatically published. Review all reachable history before enabling it; use a dedicated public-source repository when appropriate.
Full-history import returns 202 promptly after atomically reserving a durable pending target/operation. A fixed two-worker process pool recovers pending intents from the console database after restart using bounded cursor pages that isolate malformed rows. Serialization is bounded before persistence and engine submission; deterministic snapshot-size rejection remains readable as import_rejected. Current target token ID, expiry/revocation and write membership are checked before engine work and ready admission, without storing bearer credentials. New source acquisition additionally checks current source read/publication. For a confirmed target with a persisted snapshot, the worker first reads its target-bound committed receipt without source access; a verified committed result completes after source deletion, membership loss or publication revocation, while an absent receipt cannot bypass source authorization. The first source snapshot durably persisted under lease/revision CAS fixes sorted heads/tags/OIDs and HEAD for every retry; a resolve response lost before persistence can select newer refs. The engine imports only that snapshot and returns an atomic operation receipt. Source movement after persistence never repins a retry. Lost success replays the same operation; malformed receipt, partial failure, permission loss and failed CAS retain pending. Ambiguous target creation is reconciliation-required and never blindly repeated or cleaned up from existence alone.
Use the existing repository list/detail GET to poll status, retry, last_error and import_from provenance (source, source_kind, source project/repository, operation, phase, snapshot hash, refs count and HEAD). A transient failure uses durable exponential retry backoff capped at 256 seconds. A newly authorized same-payload POST can resume a permission-paused intent with the same operation after token rotation or grant restoration; terminal owned results replay under current target write without reopening a source. Phases are queued/importing/complete; this API does not report byte-level progress. Pending targets have no clone URL or Git credential scopes. Only a verified receipt admits ready. Source default branch is preserved; detached HEAD has no default_branch. Code/buildd main-only assumptions are outside this API-only capability and do not justify rewriting the source branch. Same project-scoped Idempotency-Key and normalized complete payload returns the same target; changing name or creation mode/source is 409.
SHA-1 only in the current Cloud target format. Empty/unborn sources, incompatible object formats and reachable LFS pointers are rejected; LFS payload migration, hidden/provider refs, unreachable objects, recursive submodules and external private OAuth/UI are outside v1. Gitlinks are preserved as external references.
Example:
{"name":"imported-app","import_from":{"source":"source-project/source-repository"}}Requires the generated shared schema migration and a compatible Gitcask import/receipt release before Cloud admission. Product qualification stops at PRODUCT READY FOR SRE REVIEW; production deployment belongs to comwit-sre.