Hosting: Git

Generate Git SSH key

Creates the SSH key pair of the hosting account and returns the public key. When the account already has a key, returns that key unchanged. One key serves every website of the account; add the public key to a private repository as a deploy key before deploying it.

post/api/hosting/v1/accounts/{username}/git/ssh-key

Path parameters

usernamestring required
Example:u123456789

Response

Success response

public_keystring nullable required

Public key to add as a deploy key on the Git host. Null when the account has no key yet.

Example response

{
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7 u123456789@example-server"
}

Changes

Changed in 1 of the 117 revisions of this API.1