Hanzo
OpenapiGit

Serve a clone or fetch — POST /v1/git/{org}/{repo}/git-upload-pack

The pack-transfer phase of a clone or fetch: the request and the response are git's binary pack protocol, streamed straight through git itself — request…

POST /v1/git/{org}/{repo}/git-upload-pack

Addresshttps://api.hanzo.ai/v1/git/{org}/{repo}/git-upload-pack
MethodPOST
Operationpost_git_by_org_by_repo_git-upload-pack
AuthAuthorization: Bearer $HANZO_API_KEY

The pack-transfer phase of a clone or fetch: the request and the response are git's binary pack protocol, streamed straight through git itself — request body to git's stdin, git's stdout to the response — so a multi-gigabyte clone never lands in this process's memory.

A PUBLIC repository is fetched anonymously; a private one requires its own org, and a wrong or absent org is 404 rather than a hint that the repository exists. A Content-Type other than application/x-git-upload-pack-request is 400. Addressed under the API prefix, so git clone https://<host>/v1/git/<org>/<repo>.git works on any host the binary serves. This is git's own wire protocol, not an API call to make by hand: point a git client at the clone URL and it makes this request itself.

Request

3 fields, body application/octet-stream.

FieldInTypeRequiredDescription
orgpathstringyes
repopathstringyes
(body)bodystring (binary)yes

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo git org git-upload-pack <org> <repo>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page