---
title: "Get Git SSH public key"
method: GET
path: "/api/hosting/v1/accounts/{username}/git/ssh-key"
tags: ["Hosting: Git"]
---

# Get Git SSH public key

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

Returns the public SSH key of the hosting account. `Deploy website Git repository` uses this key to
clone and pull over SSH, so a private repository works once the key is added to it as a deploy key
on the Git host. `public_key` is null when the account has no key yet.

## Path parameters

- `username` string, required

## Response `200`

Success response

- HostingV1GitGitSshKeyResource — Public SSH key the hosting account uses to clone and pull Git repositories
  - `public_key` string, nullable, required — Public key to add as a deploy key on the Git host. Null when the account has no key yet.

## Other responses

- `401` — Unauthenticated response
- `500` — Error response

## Changes

- **2026-10-05** `ddc85273ef4e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hostinger/apis/hostinger-api/changes/api/hosting/v1/accounts/:username/git/ssh-key/get.md)

---

[API](https://skmtc.dev/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.dev/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostinger/apis/hostinger-api/revisions/f086c8278a09?raw)
