This article is meant to be used in conjunction with the Looker documentation page Setting Up and Testing a Git Connection to configure a LookML project with SSH authentication. This post highlights the differences when setting up version control with a SSH key from BitBucket Cloud.
IMPORTANT: The user that owns the SSH key must be a member of the BitBucket repository and must have write access to the repository. To enable write access on the repository, the user must either be the owner of the repository, have explicit write access granted to them, or be a member of a group that has write permissions on the repository.
You can follow along with the instructions in the SSH section of the Setting Up and Testing a Git Connection documentation page. See the instructions below for steps specific to BitBucket.
- In BitBucket, get the SSH URL for your BitBucket repo. The format should look similar to this:
- Open your project in Looker and then do one of the following:
- For a new project, click the Configure Git button.
- If you want to change the setup for an existing project, click on the Git menu and select Project Settings, then click the Reset Git Connection button from the Project Settings page.
- Enter the SSH URL for your BitBucket repo in the Repository URL field for your LookML project configuration. Prior to Looker version 7.6, a port other than the default, 7999, cannot be specified.
- Looker will detect your Git provider and display an SSH deploy key for your repo. (If Looker does not successfully detect your Git provider, it will ask you to choose from a drop-down. Choose BitBucket.) Select the entire SSH deploy key and copy it to your clipboard.
- In BitBucket, click on the SSH Keys section of the BitBucket settings panel link to open the SSH Keys page for your BitBucket repository.
- In the SSH Keys page, click on the Add key button:
IMPORTANT: The SSH deploy key MUST be saved in the SSH Keys section associated with the User, NOT in the Access Keys section associated with the repository.
- Add a title for the SSH deploy key. The name is not important, but you might want to include
Lookerand your project title to keep track of it in the future.
- Paste the SSH deploy key you copied from Looker.
- Click the Save button.
Continue with steps in the Setting Up and Testing a Git Connection documentation page to finish your LookML project configuration.