How to deploy a website from GitHub or GitLab with Git

For hosting customers · Updated 2026-10-29

On this page
  1. Connect a repository
  2. Private repository: add the deploy key
  3. Deploy
  4. Deploy automatically on every push
  5. Good to know
  6. Common questions

Git Deployment copies a branch of your repository into a folder of your account — when you click a button, or automatically on every push. It works with GitHub, GitLab, Bitbucket and any Git server.

Connect a repository

  1. Log in to the control panel (https://<server>:2083).
  2. Open Git Deployment in the menu (section Files).
  3. Click Connect repository (the form is already open if you have none).
  4. Repository — the clone address, for example [email protected]:me/site.git (private) or https://github.com/me/site.git (public).
  5. Branch — default main.
  6. Deploy into (folder in your home) — default public_html. The folder must be empty (a new domain's placeholder index.html is fine), or already a clone of this repository.
  7. After deploy, run (optional) — one command line, for example composer install --no-dev && php artisan migrate --force.
  8. Click Connect.

You see Repository connected. For a private repository, add the deploy key below to it, then Deploy.

Private repository: add the deploy key

  1. On the repository's card, click Copy next to Deploy key.
  2. In GitHub: repository → Settings → Deploy keys → Add deploy key. In GitLab: Settings → Repository → Deploy keys. Paste the key and leave write access off.
  3. Use the git@… (SSH) address of the repository.

Deploy

Click Deploy now. The card shows Last deploy with the status, the commit and the time; the page refreshes while it runs. Open Output of the last deploy to see every step, including the output of your after-deploy command.

Deploy automatically on every push

  1. On the card, click Copy next to Auto deploy. The address looks like https://server.example.com:2083/hooks/git/….
  2. In the repository settings, add a webhook with that address for push events (GitHub: Settings → Webhooks → Add webhook, content type does not matter).

Every push to any branch triggers a deploy of the configured branch.

Good to know

  • The folder follows the repository exactly. Each deploy resets the folder to the latest commit of the branch: changed tracked files are overwritten and files that are not in the repository are deleted — except .env and files listed in .gitignore. Keep uploads and settings in ignored files.
  • Up to 25 repositories per account, one per folder.
  • Change the Branch or the after-deploy command on the card and click Save.
  • Disconnect removes the connection; the deployed files stay.

Common questions

The deploy failed with "The folder is not empty". What can I do?

Move the files out of the folder with the File Manager, or choose an empty folder, then click Deploy now.

The deploy failed with "Permission denied (publickey)". Why?

The repository is private and the deploy key is not added to it, or you used an https:// address. Add the key and use the git@… address.

Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.