GitLab version control

This article describes how to set up Repos for Git integration for notebooks using GitLab through the UI.

Enable and disable Git versioning

By default version control is enabled. To toggle this setting, see Manage the ability to version notebooks in Git. If Git versioning is disabled, the Git Integration tab is not available in the User Settings screen.

Configure version control

Configuring version control involves creating access credentials in your version control provider and adding those credentials to Databricks.

Get an access token

Go to GitLab and create a personal access token that allows access to your repositories:

  1. From GitLab, click your user icon in the upper right corner of the screen and select Preferences.

  2. Click Access Tokens in the sidebar.

    Generate GitLab token
  3. Enter a name for the token.

  4. Check the read_repository and write_repository permissions, and click Create personal access token.

  5. Copy the token to your clipboard. Enter this token in Databricks in the next step.

See the GitLab documentation to learn more about how to create and manage personal access tokens.

Save your access token to Databricks

  1. Click User Settings Icon Settings at the lower left of your screen and select User Settings.
  2. Click the Git Integration tab.
  3. If you have previously entered credentials, click the Change settings button.
  4. In the Git provider drop-down, select GitLab.
  5. Paste your token into the Token field.
  6. Enter your GitLab username or email into the Git provider username or email field and click Save.