Connect to GitHub
Connecting your GitHub account to dbt Cloud provides convenience and another layer of security to dbt Cloud:
- Import new GitHub repositories with a couple clicks during dbt Cloud project setup.
- Clone repos using HTTPS rather than SSH.
- Trigger Continuous integration(CI) builds when pull requests are opened in GitHub.
Prerequisites
- For On-Premises GitHub deployment, reference importing a project by git URL to set up your connection instead. Some git features are limited with this setup.
- Note — Single tenant accounts offer enhanced connection options for integrating with an On-Premises GitHub deployment setup using the native integration. This integration allows you to use all the features of the integration, such as triggering CI builds. The dbt Labs infrastructure team will coordinate with you to ensure any additional networking configuration requirements are met and completed. To discuss details, contact dbt Labs support or your dbt Cloud account team.
- You must be a GitHub organization owner in order to install the dbt Cloud application in your GitHub organization. To learn about GitHub organization roles, see the GitHub documentation.
- The GitHub organization owner requires Owner or Account Admin permissions when they log into dbt Cloud to integrate with a GitHub environment using organizations.
- You may need to temporarily provide an extra dbt Cloud user account with Owner or Account Admin permissions for your GitHub organization owner until they complete the installation.
Installing dbt Cloud in your GitHub account
You can connect your dbt Cloud account to GitHub by installing the dbt Cloud application in your GitHub organization and providing access to the appropriate repositories. To connect your dbt Cloud account to your GitHub account:
-
From dbt Cloud, click on your account name in the left side menu and select Account settings.
-
Select Personal profile under the Your profile section.
-
Scroll down to Linked accounts.
-
In the Linked accounts section, set up your GitHub account connection to dbt Cloud by clicking Link to the right of GitHub. This redirects you to your account on GitHub where you will be asked to install and configure the dbt Cloud application.
-
Select the GitHub organization and repositories dbt Cloud should access.
-
Assign the dbt Cloud GitHub App the following permissions:
- Read access to metadata
- Read and write access to Checks
- Read and write access to Commit statuses
- Read and write access to Contents (Code)
- Read and write access to Pull requests
- Read and write access to Webhooks
- Read and write access to Workflows
-
Once you grant access to the app, you will be redirected back to dbt Cloud and shown a linked account success state. You are now personally authenticated.
-
Ask your team members to individually authenticate by connecting their personal GitHub profiles.
Limiting repository access in GitHub
If you are your GitHub organization owner, you can also configure the dbt Cloud GitHub application to have access to only select repositories. This configuration must be done in GitHub, but we provide an easy link in dbt Cloud to start this process.
Authenticate your personal GitHub account
After the dbt Cloud administrator sets up a connection to your organization's GitHub account, you need to authenticate using your personal account. You must connect your personal GitHub profile to dbt Cloud to use the dbt Cloud IDE and CLI and verify your read and write access to the repository.
-
dbt Cloud developers on the Enterprise plan must each connect their GitHub profiles to dbt Cloud. This is because the dbt Cloud IDE verifies every developer's read / write access for the dbt repo.
-
dbt Cloud developers on the Team plan don't need to each connect their profiles to GitHub, however, it's still recommended to do so.
To connect a personal GitHub account:
-
From dbt Cloud, click on your account name in the left side menu and select Account settings.
-
Select Personal profile under the Your profile section.
-
Scroll down to Linked accounts. If your GitHub account is not connected, you’ll see "No connected account".
-
Select Link to begin the setup process. You’ll be redirected to GitHub, and asked to authorize dbt Cloud in a grant screen.
- Once you approve authorization, you will be redirected to dbt Cloud, and you should now see your connected account.
You can now use the dbt Cloud IDE or dbt Cloud CLI.