Get a Git access token & connect a remote repo to 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

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 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 Databricks under User Settings > Git integration.

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

AWS CodeCommit

In AWS CodeCommit, follow these steps to create a HTTPS Git credential that allows access to your repositories:

  1. In AWS CodeCommit, create HTTPS Git credentials that allow access to your repositories. See the AWS CodeCommit documentation. The associated IAM user must have “read” and “write” permissions for the repository.

  2. Record the password. You enter this password in Databricks under User Settings > Git integration.

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 Databricks, set your Git provider to Azure DevOps Services on the User Settings page:

  1. In the account menu, select User Settings.

  2. Click the Git Integration tab.

  3. Change your provider to Azure DevOps Services.

    Azure DevOps Services GitHub provider

You can also use an Azure DevOps personal access token for access. Follow the Azure DevOps documentation. Give the token the “Full access” scope.

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 Databricks, enter this password under User Settings > Git integration.