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:ย 

Enable git credential for entire Databricks account

tonypiazza
New Contributor II

Hello,

I have a question regarding git authentication in the context of a Databricks job. I know that a GitHub Personal Access Token can be generated for a user using GitHub App authorization flow. My team is currently configuring Terraform templates to drive the creation of dbt jobs within a Databricks workspace. Is there some way at the account level to authorize access to all private repositories within a GitHub organization? Or are git credentials required to be configured on a "per user" basis? 

Any guidance here would be super helpful.

1 ACCEPTED SOLUTION

Accepted Solutions

Yeshwanth
Honored Contributor
Honored Contributor

@tonypiazza good day!

To authorize access to all private repositories within a GitHub organization at the account level, without configuring git credentials on a per-user basis, follow these steps:


1. Use a GitHub Machine User:
- Create a GitHub machine user (a separate GitHub personal account for automation).
- Grant this machine user access to the necessary repositories within your GitHub organization.


2. Generate a GitHub Personal Access Token (PAT):
- Sign in to GitHub as the machine user.
- Create a PAT with the required scopes (e.g., repo, workflow).


3. Configure Databricks to Use the GitHub Machine User:
- Add the machine user's PAT to your Databricks workspace by configuring the Git provider credentials.
- Ensure the Databricks workspace uses these credentials for accessing the GitHub repositories.

I hope this helps. Please let us know if you have any further questions or concerns.

Best regards,

Yesh

View solution in original post

1 REPLY 1

Yeshwanth
Honored Contributor
Honored Contributor

@tonypiazza good day!

To authorize access to all private repositories within a GitHub organization at the account level, without configuring git credentials on a per-user basis, follow these steps:


1. Use a GitHub Machine User:
- Create a GitHub machine user (a separate GitHub personal account for automation).
- Grant this machine user access to the necessary repositories within your GitHub organization.


2. Generate a GitHub Personal Access Token (PAT):
- Sign in to GitHub as the machine user.
- Create a PAT with the required scopes (e.g., repo, workflow).


3. Configure Databricks to Use the GitHub Machine User:
- Add the machine user's PAT to your Databricks workspace by configuring the Git provider credentials.
- Ensure the Databricks workspace uses these credentials for accessing the GitHub repositories.

I hope this helps. Please let us know if you have any further questions or concerns.

Best regards,

Yesh

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!