Using GitLab for Version Control in Looker

  • 21 June 2018
  • 1 reply

Userlevel 4

Use this post together with the Looker Document Setting Up Version Control to configure your version control with GitLab.

  1. Refer to the instructions in the Setting Up Version Control document. You can create a new repository in GitLab by clicking the + icon in the upper right corner of any page and selecting “New Project,” then follow these instructions:

  2. Get the SSH URL for your GitLab repo. The format should look like this:<organization-name>/<repository-name>.git 

    You can see the SSH URL by clicking on the project’s Details tab.

  3. Refer to Step 3 in the Setting Up Version Control document

  4. Looker will detect your Git provider and display a deploy key for your repo. (If Looker does not successfully detect your Git provider, it will ask you to choose from a dropdown.) Select the entire Deploy Key and copy it to your clipboard, then click the link under “Add the SSH Key” to visit the SSH Keys section of the GitLab settings panel.


  5. Add a title for the deploy key. The name isn’t important, but you might want to include “Looker” and your project title to keep track of it in the future. Paste the deploy key that you copied from Looker.

  6. Check Write access allowed

  7. Click “Add Key”

  8. Continue with Step 11 in the Setting Up Version Control document

1 reply

We can also set up Pull Requests (“Merge Requests” in Gitlab/Gitlab Enterprise). The setup is similar to the base setup in our documentation here.

For the setup on the Gitlab side, you will want to:

  1. Go to the Project page

  2. Go to Settings

  3. Go to Integrations

  4. Add the Deploy webhook URL into the URL field

  5. Make sure Push Events is checked

  6. Save the new webhook by click Add Webhook