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.
In GitHub, follow these steps to create a personal access token that allows access to your repositories:
In the upper-right corner of any page, click your profile photo, then click Settings.
Click Developer settings.
Click the Personal access tokens tab.
Click the Generate new token button.
Enter a token description.
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.
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.
In GitLab, follow these steps to create a personal access token that allows access to your repositories:
From GitLab, click your user icon in the upper right corner of the screen and select Preferences.
Click Access Tokens in the sidebar.
Enter a name for the token.
write_repositorypermissions, and click Create personal access token.
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.
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:
Click Settings at the lower left of your screen and select User Settings.
Click the Git Integration tab.
Change your provider to Azure DevOps Services.
In Bitbucket, follow these steps to create an app password that allows access to your repositories:
- Go to Bitbucket Cloud and create an app password that allows access to your repositories. See the Bitbucket Cloud documentation.
- Record the password.
- In Azure Databricks, enter this password under User Settings > Git integration.