List website Git repositories
Lists the Git repositories linked to directories of the website, with Deploy website Git repository or in the Git section of hPanel: clone URL, branch and directory of each one.
Lists the Git repositories linked to directories of the website, with
Deploy website Git repository or in the Git section of hPanel: clone URL, branch and directory of
each one. A repository whose clone failed stays listed; deploying it again retries the clone. GitHub
and GitLab auto-deployments are not listed here; see Get Git auto-deployment settings.
API Token authentication
u123456789Domain name
mydomain.tldSuccess response
Clone URL of the repository. A username, password or token in an HTTP(S) URL, or a password in any
URL, is shown as ***.
git@github.com:octocat/my-site.gitBranch that is cloned and pulled
mainDirectory under the website document root. Empty means the document root.
my-siteUnauthenticated response
Error response
GET /api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"repository_url": "git@github.com:octocat/my-site.git",
"branch": "main",
"directory": "my-site",
"webhook": {
"url": "https://webhooks.hostinger.com/deploy/6f1ed002ab5595859014ebf0951522d9",
"provider": "Github",
"setup_url": "https://github.com/octocat/my-site/settings/hooks/new",
"tutorial_url": "https://developer.github.com/webhooks/creating/"
}
}
]Last updated
Was this helpful?