Hanzo
OpenapiGit

Advertise a repository's refs to a git client — GET /v1/git/{org}/{repo}/info/refs

The ref-advertisement phase of git's smart-HTTP protocol — the first request a clone, a fetch and a push all make.

GET /v1/git/{org}/{repo}/info/refs

Addresshttps://api.hanzo.ai/v1/git/{org}/{repo}/info/refs
MethodGET
Operationget_git_by_org_by_repo_info_refs
AuthAuthorization: Bearer $HANZO_API_KEY

The ref-advertisement phase of git's smart-HTTP protocol — the first request a clone, a fetch and a push all make. ?service= selects which: git-upload-pack advertises for a fetch, git-receive-pack for a push, and any other value is 400.

ANONYMOUS ONLY FOR FETCH, AND ONLY ON A PUBLIC REPOSITORY. The push advertisement always requires an authenticated org, and where a path org is present it must equal the authenticated one. A private repository reached without its org is 404, indistinguishable from one that does not exist. 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

2 fields.

FieldInTypeRequiredDescription
orgpathstringyes
repopathstringyes

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 info refs <org> <repo>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page