Hanzo
OpenapiGit

Registers an SSH public key so it can authenticate `git clone…

Registers an SSH public key so it can authenticate `git clone git@<host>:<org>/<repo>.git` for the caller's org.

POST /v1/git/keys

Addresshttps://api.hanzo.ai/v1/git/keys
MethodPOST
Operationpost_git_keys
AuthAuthorization: Bearer $HANZO_API_KEY

Registers an SSH public key so it can authenticate git clone git@&lt;host&gt;:&lt;org&gt;/&lt;repo&gt;.git for the caller's org. The key line is parsed and canonicalized before storage, its SHA256 fingerprint becomes the auth lookup handle, and the full public key round-trips (it is public). Answers 201. Fingerprints are globally unique, so a key already registered — to this org or any other — is a 409: one key belongs to exactly one org.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
publicKeybodystringPublicKey is one OpenSSH authorized-key line ("ssh-ed25519 AAAA… you@host").
titlebodystringTitle labels the key in the console.

Response

StatusBodyMeaning
201keyViewcreated

201 body — 5 fields.

FieldInTypeAlwaysDescription
createdAtbodystringCreatedAt is RFC 3339 UTC.
fingerprintbodystringFingerprint is the key's SHA256 fingerprint ("SHA256:…"), globally unique and the handle SSH auth resolves a presented key by.
idbodystringID is the key's identifier ("gitkey_…"), the handle to delete it by.
publicKeybodystringPublicKey is the canonical OpenSSH authorized-key line as stored.
titlebodystringTitle is the key's label — the caller's, or the comment on the key line.

Failure carries the platform error shape — see Errors.

Examples

hanzo git keys create

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page