CDNShark Documentation

Web Hosting

← Back to Documentation

Clone and Deploy from GitHub or GitLab

Keep your code on GitHub, GitLab, Bitbucket or any Git host that supports HTTPS, and deploy it to your hosting with one click or automatically on every push.

1. Get the clone URL

On your repository's page, click Code (GitHub) or Clone (GitLab) and copy the HTTPS URL, for example https://github.com/acme/my-site.git. SSH URLs (git@…) aren't supported.

2. Private repository? Create a read-only token

HostWhat to createUsername field
GitHubSettings → Developer settings → Fine-grained token, access to this repository only, permission Contents: Read-onlyleave blank
GitLabRepository → Settings → Repository → Deploy tokens, scope read_repositorythe deploy token's username
BitbucketPersonal settings → App passwords, permission Repositories: Readyour Bitbucket username

Public repositories need no token.

3. Create the repository

  1. Open your hosting account → Git → Create Repository.
  2. Choose Clone from GitHub / GitLab / any HTTPS remote.
  3. Repository name: a short name for it here, e.g. my-site.
  4. Branch to deploy: usually main.
  5. Clone URL, and for a private repository the Username and Access token.
  6. Deploy to domain and Folder: where the files go. See "Which folder?" in Deploy Your Site with Git.
  7. Optional: tick Deploy when GitHub/GitLab is pushed to get a webhook URL (Auto-Deploy on Every Push).
  8. Click Create.

The repository is cloned and deployed straight away. When its status is active, the Current commit column shows what's live.

4. Deploy updates

After pushing to GitHub/GitLab, click Pull & Deploy on the repository's row, or set up the webhook to do it automatically.

If it fails

The reason appears under the repository's row:

  • Authentication failed / Repository not found: wrong or expired token, or the token can't see this repository.
  • couldn't find remote ref main: the branch name is wrong (some repositories use master).

Fix it in the repository's settings (the gear icon) and click Pull & Deploy again. A saved token is never shown; leave the field blank to keep it, or tick Remove the saved token.