Get a Git access token & connect a remote repo to Azure Databricks

This article describes how to create a personal access token (PAT) in your Git provider so that you can connect to Databricks Repos.

Supported Git providers

Azure Databricks supports the following Git providers:

Databricks Repos also supports Bitbucket Server, GitHub Enterprise Server, and GitLab self-managed. To integrate with a private Git server instance that is not internet-accessible, get in touch with your Databricks representative.

GitHub or GitHub AE

In GitHub, follow these steps to create a personal access token that allows access to your repositories:

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

  2. Click Developer settings.

  3. Click the Personal access tokens tab.

  4. Click the Generate new token button.

  5. Enter a token description.

  6. Select the repo scope and workflow scope, and click the Generate token button. workflow scope is needed in case your repository has GitHub Action workflows.

    Generate GitHub token

  7. Copy the token to your clipboard. You enter this token in Azure Databricks under User Settings > Git integration.

See the GitHub documentation to learn more about how to create personal access tokens.

GitLab

In GitLab, follow these steps to 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 Azure Databricks under User Settings > Git integration.

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

Azure DevOps Services

Authentication with Azure DevOps Services is done automatically when you authenticate using Azure Active Directory (Azure AD). The Azure DevOps Services organization must be linked to the same Azure AD tenant as Databricks.

In Azure Databricks, set your Git provider to Azure DevOps Services on the User Settings page:

  1. Click User Settings Icon Settings at the lower left of your screen and select User Settings.

  2. Click the Git Integration tab.

  3. Change your provider to Azure DevOps Services.

    Azure DevOps Services GitHub provider

Bitbucket

In Bitbucket, follow these steps to create an app password that allows access to your repositories:

  1. Go to Bitbucket Cloud and create an app password that allows access to your repositories. See the Bitbucket Cloud documentation.
  2. Record the password.
  3. In Azure Databricks, enter this password under User Settings > Git integration.