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

missing github email address in commits

Paweล‚_Janczyk
New Contributor

Hello everyone, 

I would like to configure github client on my databricks workspace. Especially an email address in not visible and is replace by my github user name. Do you know how I can do that?

Pawe_Janczyk_0-1747049752792.png

 

7 REPLIES 7

BigRoux
Databricks Employee
Databricks Employee
To configure your GitHub client in your Databricks workspace and hide your email address so it is replaced by your GitHub username when committing changes, you can use the git config command to set the appropriate configurations globally or locally for your repository.
Here are the steps:
  1. Set your Git Configuration for Username: You can set your GitHub username globally using the following command: bash git config --global user.name "YourGitHubUsername" Replace "YourGitHubUsername" with your actual GitHub username.
  2. Set your Git Configuration for Email: To mask the email associated with your commits, GitHub provides a "noreply" email format that can be linked to your GitHub account. Use the following command: bash git config --global user.email "YourGitHubUsername@users.noreply.github.com" Replace "YourGitHubUsername@users.noreply.github.com" with the noreply email provided by GitHub.
    You can verify and set this email in your GitHub account settings. Navigate to:
    • GitHub Settings > Emails > Ensure you add and confirm the @users.noreply.github.com email to your account.
  3. Install and Configure GitHub Client in Databricks:
    • Link your GitHub account in Databricks under User Settings > Linked Accounts.
    • Configure Git credentials with a fine-grained Personal Access Token (PAT) or use OAuth 2.0 for authentication as described in Microsoft Learn. This step allows Databricks to act on your behalf during Git operations performed within the workspace.
  4. Verify Configuration: After setting the configuration, verify the changes: bash git config --list
    This will display all the current configuration, including the username and masked email settings.
These steps should allow you to mask your email address and use your GitHub username for commits within your Databricks workspace. If issues arise, confirm that your GitHub username and noreply email are correctly associated with your GitHub account.
 
Hope this helps, Lou.

@BigRoux Where should we execute this commands?
When I tried running these commands in workspace from terminal or from notebook I am getting following error

Commands I tried

%sh
git config --global user.name
"USERNAME"
git config --global user.email "NOREPLY_EMAIL_ADDRESS"

 

error: could not lock config file /Workspace/.proc/self/git/config: No such file or directory 
error: could not lock config file /Workspace/.proc/self/git/config: No such file or directory


 

BigRoux
Databricks Employee
Databricks Employee

Why the Can Error Occur

  • Databricks now sets the environment variable GIT_CONFIG_GLOBAL=/Workspace/.proc/self/git/config in notebooks and web terminals, so when you run any git --global command, Git tries to read/write the config at that path.
  • On some cluster types (especially serverless and web terminal):
    • Databricks automatically sets up this virtual config file using workspace file system (WSFS)โ€”but only if the right supporting services and preview features are enabled for your workspace and cluster type.
    • If the supporting back-end (CP APIs, WSFS, or feature flags) isnโ€™t available or not yet rolled out in your environment, that virtual config file simply doesnโ€™t existโ€”resulting in the "No such file or directory" locking error.
  • This also happens on some free-tier or newer workspaces where the data plane-to-control plane integration for the Git config has not been fully configured or enabled yet

 

Tell me more about your environment? Are you on community edition?  Are you a customer of Databricks?

 

Louis

@BigRoux I have reached out to you on LinkedIn to share info more privately. Thanks for the reply.

aakashnand-kt
New Contributor III

@BigRoux Hi Louis,

I am using Enterprise databricks version. Could you please share the exact name of the features that needs to be enabled that I can ask my account team to enable this for us ?

Thanks

Have you tried configuring it through the UI?

1. Go to User Settings in your Databricks workspace
2. Navigate to Git Integration
3. Configure your Git provider credentials there
4. This will handle the authentication and user identification for Git operations
 
Try that and see if it solves the issue.

I did try to check there but if I use Databricks App method to connect to Github (not the PAT) then it doesn't allow me to configure email address

aakashnandkt_0-1753922038107.png

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now