cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
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
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
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,

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?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.