Choose your preferred SSG:
Choose your preferred SSG:

Connecting a GitHub repository as your source

Connecting GitHub allows you to work on your websites locally and have the changes sync to CloudCannon. File changes made on CloudCannon are also synced back to GitHub.

To connect a GitHub repository and start syncing files, follow these instructions:

  1. Go to Site Settings / Source Syncing
  2. Select GitHub repository
  3. Click Authenticate
Selecting GitHub as your source provider

This redirects you to GitHub. Enter your credentials to continue.

GitHub authentication screen

Give CloudCannon access to your GitHub Account by clicking Authorize CloudCannon

GitHub connection screen

You’ll be redirected back to CloudCannon and asked to install the GitHub App.

Installing the GitHub App

Install the CloudCannon GitHub App on your personal account or on your organization. Select to grant access to all repositories or only select repositories.  

Install GitHub App

You’ll be redirected back to CloudCannon  to pick a repository to connect.

Select your repository

If you can’t find your repository from the list, click Configure the GitHub App to change your repository access for an existing installation. Or click Install new GitHub App to install on a different account.

Configure your GitHub App
Important

Any existing files on your website will be replaced with the contents of the selected repository. Click Backup and Sync to continue, or exit the page to cancel the process.

GitHub is now connected. Changes you push to the Git repository are pulled in by CloudCannon. Any changes made on CloudCannon are automatically committed and pushed.

Migrating to GitHub App

By migrating to the GitHub App integration, you will be able to control the repositories to which you give CloudCannon access. 

To migrate to GitHub App, follow these instructions:

  1. Go to Organization Settings > Files > GitHub
  2. Ensure you are logged into GitHub with the same GitHub account displayed above
  3. Click Migrate to GitHub app
  4. Follow the steps to Authorize CloudCannon and subsequently Install the GitHub App

Once migrated, a confirmation email will provide a link to revoke any old authentication in GitHub. Webhooks to CloudCannon on repositories can be deleted.

GitHub Organization Settings
Was this article helpful? or Suggest an improvement >

Related articles