cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Bitbucket Cloud Repo Integration with Token

Carsten03
New Contributor III

Hey,

I am using Bitbucket Cloud and I want to connect my repository to Databricks. I am able to connect with my personal app password but what I am looking for is an authentication of a technical user.

I need the integration to point to my dbt repo, which will run as a workflow task and I don't want to use my personal git credentials for that because the service principal is the owner of the pipeline.

Is there a way of using non-personal access tokens to authenticate or is the only way creating a new technical user on Bitbucket?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager

Hi @Carsten03Letโ€™s explore the options for authenticating your Databricks integration with Bitbucket Cloud.

  1. Databricks GitHub App (Recommended):

    • If youโ€™re using a hosted GitHub account, consider using the Databricks GitHub App for user authentication instead of Personal Access Tokens (PATs).
    • Benefits of using the Databricks GitHub App:
      • It uses OAuth 2.0 for user authentication, ensuring strong security.
      • OAuth 2.0 repo traffic is encrypted.
      • Integration is easier and doesnโ€™t require individual tracking of tokens.
      • Token renewal is handled automatically.
      • You can scope the integration to specific attached Git repos, allowing granular control over access.
    • To set this up:
  2. Bitbucket Cloud Repository Access Token:

  3. Databricks Personal Access Token (PAT):

 

View solution in original post

3 REPLIES 3

Kaniz_Fatma
Community Manager
Community Manager

Hi @Carsten03Letโ€™s explore the options for authenticating your Databricks integration with Bitbucket Cloud.

  1. Databricks GitHub App (Recommended):

    • If youโ€™re using a hosted GitHub account, consider using the Databricks GitHub App for user authentication instead of Personal Access Tokens (PATs).
    • Benefits of using the Databricks GitHub App:
      • It uses OAuth 2.0 for user authentication, ensuring strong security.
      • OAuth 2.0 repo traffic is encrypted.
      • Integration is easier and doesnโ€™t require individual tracking of tokens.
      • Token renewal is handled automatically.
      • You can scope the integration to specific attached Git repos, allowing granular control over access.
    • To set this up:
  2. Bitbucket Cloud Repository Access Token:

  3. Databricks Personal Access Token (PAT):

 

Carsten03
New Contributor III

Hi @Kaniz_Fatma,

thank you for your response! With this link you provided, I was able to authenticate with Bitbucket Cloud. The solution was to use x-token-auth as a username. I have tried with the generated email address before which didn't work. Thank you! Now I am facing the next issue.

I wanted to use the repository access to run dbt via workflows. I have added the git credential via terraform and checked with the cli that it is available, but I now I get the following error message:

 

[RepositoryCheckoutFailed] Failed to checkout Git repository: PERMISSION_DENIED: Missing Git provider credentials. Go to User Settings > Git Integration to set up your Git credentials

 

I want to run the workflow with a service principal as an owner and therefore don't want to set the git credentials for my personal user. How can the service principal get access to the git credential / repository?

Carsten03
New Contributor III

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group