---
title: "Mint a short-lived git remote for a plain repo (Kody smart-HTTP proxy in front of Cloudflare Artifacts)."
method: POST
path: "/v1/repos/{repo_id}/git-remote"
tags: ["repos"]
---

# Mint a short-lived git remote for a plain repo (Kody smart-HTTP proxy in front of Cloudflare Artifacts).

`POST /v1/repos/{repo_id}/git-remote`

## Request

- Base URL: `https://api.kody.codes`
- URL: `https://api.kody.codes/v1/repos/{repo_id}/git-remote`
- Auth: HTTP bearer

Mint a short-lived git remote for a plain repo (Kody smart-HTTP proxy in front of Cloudflare Artifacts). When scope is omitted, defaults to write if you have org-wide write access, otherwise read. Pass scope explicitly to force read or write; requesting write without write access is denied with guidance (use scope: 'read', or ask an Owner for a grant). Write pushes are live at HEAD — no package publish reconcile step runs afterward. Concurrent push lock contention is held and retried on the proxy (bounded wait) before HTTP 503 with Retry-After and "repository busy, retry". A read remote rejects push with: this remote is read-only; request scope: 'write'. The result includes `git_author` (signed-in Kody account email and display name) and `setup_commands` that set local `user.email` / `user.name` to that identity — never invent a git email. The Artifacts backing store fails pushes above ~32 MiB of decompressed pack content with a raw HTTP 413.

Org permission: `package:read`.

## Path parameters

- `repo_id` string, required: Plain repo UUID, or the repo name. OpenAPI path `/v1/repos/{repo_id}/git-remote` accepts either. Prefer `name` (or this field) on `POST /v1/repos/git-remote` when calling via CLI/OpenAPI without a path id.

## Request body

- object
  - `name` string: Plain repo name. Provide exactly one of `repo_id` or `name`. Works on MCP `api`, execute, and OpenAPI `POST /v1/repos/git-remote`.
  - `scope` 'read' | 'write': Access scope for the minted Artifacts token. When omitted, defaults to write if you have write access, otherwise read. Explicit scope is honored; requesting write without write access is denied. A read remote rejects push with: this remote is read-only; request scope: 'write'.
  - `ttl_seconds` integer

## Response `200`

Success.

- object
  - `repo_id` string, required
  - `name` string, required
  - `source_id` string, required
  - `remote` string, required
  - `authenticated_remote` string, required
  - `git_extra_header` string, required
  - `scope` 'read' | 'write', required
  - `expires_at` string, required
  - `git_author` object, required: Git author for this clone: the signed-in Kody account. setup_commands set local user.name and user.email to these values.
    - `name` string, required: Signed-in Kody account display name. Use as git user.name; do not guess a name.
    - `email` string, email, required: Signed-in Kody account email. Use as git user.email; never invent an email.
  - `setup_commands` string[], required
  - `live_at_head` true, required

## Other responses

- `400`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `401`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `403`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `404`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `409`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `413`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `429`: Too many requests (edge IP/token limit) or an entitlement / plan-cap limit. Wait at least `Retry-After` seconds before retrying.
- `500`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `503`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `default`: Error envelope `{ "error": { "code", "message", "details"? } }`.

---

[API](https://skmtc.dev/kody/apis/kody-api.md) · [All operations](https://skmtc.dev/kody/apis/kody-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kody/apis/kody-api/revisions/705f4f022728?raw)
