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

@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

@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

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