Introducing PopSQL + dbt. The first SQL editor with built-in dbt support.Read more →

How to connect a GitHub or GitLab repository

This feature is available in our Enterprise plan. Please contact us if you're interested in learning more or trialing the integration.

Whether you’re looking to build pipelines from a git repository to dbt, Tableau, Looker, etc. or looking for an additional layer of data governance, on top of PopSQL’s in-app version history, PopSQL has you covered with our two-way GitHub or GitLab sync. Once you connect a repo to PopSQL, if you make a change in PopSQL, it gets pushed to GitHub or GitLab and vice versa.

The benefit of this integration is that it gives you more control of your data. For example, imagine you have thousands of queries and need to swap a table name due to a schema change. Without git integration, your end users would have to manually make these changes one by one. However, with our two-way sync, you can persist all your PopSQL queries in GitHub or GitLab, clone the repo in a free code editor tool like VS Code, do a global bulk find and replace, push to GitHub or GitLab, and the changes will be reflected in all the relevant queries in PopSQL -- saving hours of time and eliminating the risk of inaccurate reports.

Here’s how to get started once you have GitHub integration enabled

Step 1: Create a new GitHub repo, e.g.

Step 2: Visit your PopSQL settings page and click the button to connect GitHub.


Step 3: Authorize PopSQL and select the repo you just made.


Step 4: Click to install and you’re all set!

Here’s how to get started once you have GitLab integration enabled

Step 1: Create a new GitLab repo, e.g.

Step 2: Visit your PopSQL settings page and click the button to open a form.

Step 3: Enter required data:


  • We recommend using a project access token to limit permissions so that PopSQL can only access that project. Personal access tokens are also tied to a user and can be accidentally revoked if that user is edited or removed. Note that project access tokens are only available on paid GitLab plans.
  • Please ensure your token has "Maintainer" or "Owner" permissions to the project so that PopSQL can push and pull from the default branch. Alternatively, you can change the permissions of the default branch to allow any user to push or pull from them: Protected Branches.
  • You can find the project ID on the main project page in GitLab:


Step 4: Click Connect GitLab repository and you’re all set!

Ready for a modern SQL editor?