Hanzo
OpenapiGit

Advertise a repository's refs to a git client — GET /v1/git/{org}/{project}/{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}/{project}/{repo}/info/refs

Addresshttps://api.hanzo.ai/v1/git/{org}/{project}/{repo}/info/refs
MethodGET
Operationget_git_by_org_by_project_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, with the PROJECT as a middle path segment: project scope otherwise rides a header a git client cannot send, so this path is the only usable remote for a project-scoped repository. 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.

FieldInTypeRequiredDescription
orgpathstringyes
projectpathstringyes
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 project info refs <org> <project> <repo>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page