cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to configure github credentials for a service principal NOT using Azure

brian999
Contributor

I want to have a service principal run a job that uses a notebook in our github. We are AWS not Azure. How do I configure git credentials for the service principal? Does this use deploy keys?

2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager

Hi @brian999, Letโ€™s break down the steps for configuring Git credentials for a service principal in an AWS environment:

  1. Create an IAM User:

  2. Configure IAM Permissions:

    • Sign in to the AWS Management Console and open the IAM console.
    • Navigate to the IAM user you want to configure for CodeCommit access.
    • On the Permissions tab, choose โ€œAdd Permissions.โ€
    • In the โ€œGrant permissionsโ€ section, select the appropriate managed policy for CodeCommit access (e.g., AWSCodeCommitPowerUser).
    • Review the list of policies and add them to the IAM user1.
  3. Install Git:

    • To work with files, commits, and other information in CodeCommit repositories, you need to install Git on your local machine.
    • CodeCommit supports Git versions 1.7.9 and later. We recommend using a recent version of Git1.
  4. Configure Git Credentials:

  5. Using Git Credentials:

Regarding deploy keys, they are typically used for authenticating read-only access to a GitHub repository. Since youโ€™re working with AWS CodeCommit, you wonโ€™t need to deploy keys. Instead, follow the steps above to set up Git credentials for your IAM user.

If youโ€™re using Azure Databricks, you can authenticate using a service principal by running the following command:

az login --service-principal --allow-no-subscriptions --username [YOUR_APP_ID] --password [YOUR_CLIENT_SECRET] --tenant [YOUR_TENANT_ID]

Replace [YOUR_APP_ID], [YOUR_CLIENT_SECRET], and [YOUR_TENANT_ID] with your actual values2.

Remember that the process may vary slightly based on your specific use case, but the steps above should guide you in configuring Git credentials for your service principal in an AWS environment.

Happy coding! ๐Ÿ˜Š๐Ÿš€1234

 

brian999
Contributor

Awesome details thank you for your help.

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