Configure Source Control with GitHub
Learn how to set up Source Control with GitHub.
You can use Source Control with GitHub to manage changes using pull requests. You create a repository for Source Control to use, then configure a GitHub App for your Retool instance that commits, pushes, and pulls changes.
Requirements
To configure Source Control with GitHub, you must have:
- Administrator permissions in your Retool organization.
- Permissions to create an app in GitHub.
1. Create a Git repository
Use a new, dedicated Git repository. Source Control does not work with an existing Git Syncing repository.
To begin, create a new repository for Source Control. Ensure it contains a README.md file and a main
branch. Source Control uses this repository to store and track all changes.
If you have multiple Retool instances, use this same repository across all instances.
2. Create and install a GitHub App
Create a GitHub App with the following settings. Ensure this app is created by the same owner as the Git repository. Refer to GitHub's guide for more information.
If you have multiple Retool instances, use this same GitHub App across all instances.
Setting | Value |
---|---|
GitHub App name | The name of your GitHub App. |
Homepage URL | The URL of your GitHub App. This field is unused by Retool. |
Expire user authorization tokens | Unchecked |
Request user authorization (OAuth) during installation | Unchecked |
Webhook > Active | Unchecked |
Permissions > Contents | Read and write |
Permissions > Pull requests | Read and write |
Where can this GitHub App be installed? | Only on this account |
Install the GitHub App
After you create your GitHub App, it should appear in the GitHub Apps section of your Developer Settings.
To install your GitHub App:
- Click Edit next to your app to see its settings.
- Click on Install App.
- Click the Install button next to your organization.
- Choose the Only select repositories option and select the repository created in the first section.
- You’ll be redirected to the installation page. The number at the end of the URL is the installation ID. Save this for later.
https://github.com/settings/installations/:installation_id