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:
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 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 Databricks under User Settings > Git integration.
See the GitLab documentation to learn more about how to create and manage personal access tokens.
In AWS CodeCommit, follow these steps to create a HTTPS Git credential that allows access to your repositories:
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.
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:
In the account menu, select User Settings.
Click the Git Integration tab.
Change your provider to Azure DevOps Services.
You can also use an Azure DevOps personal access token for access. Follow the Azure DevOps documentation. Give the token the “Full access” scope.
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 Databricks, enter this password under User Settings > Git integration.