cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

GitLab integration

Giorgi
Contributor

I've followed instructions and did gitlab integration:

  1. Generated Personal Access Token from GitLab
  2. Add token (from step 1) to User settings (GitLab, email, token)
  3. In Admin console -> Repos Git URL Allow List permissions: Disabled (no restrictions)
  4. In Admin console -> Repos Git URL Allow List: https:.....*.git
  5. Pull works
  6. Push does not: The remote Git repo URL linked to this repo is not listed in the ALLOW list configured by your Workspace admin.

Am I missing some step?

Thanks for help !

5 REPLIES 5

Hubert-Dudek
Esteemed Contributor III

"In Admin console -> Repos Git URL Allow List permissions: Disabled (no restrictions)."

Here I am using "only restrict .." give it a try ๐Ÿ™‚

"In Admin console -> Repos Git URL Allow List: https:.....*.git"

Here just put only domain and separate it by commas, for example:

https://dev.azure.com/,https://gitlab.mycompany.com/

joshuat
New Contributor III

I'd like to resurrect this thread, as there's no solution posted yet. When I try to push a branch from Databricks, I am receiving 

Error pushing changes. Remote ref update was rejected. Make sure you have write access to this remote repository.

My repo is located on gitlab.com. Setup:

  • In the Databricks Linked account settings, I've tried Git `username` as my corporate email in Gitlab. I've also tried `username` as my GitLab account name
  • In the Databricks Linked account settings, I've tried `GitLab` and `Gitlab Enterprise Edition` as the Git provider.
  • In the Databricks Admin settings, I have enabled "Restrict Clone, Commit & Push to allowed Git repositories" and set the URL allow list to "https://gitlab.com"
  • My HTTPS GitLab token has `read_repository, write_repository` scopes with a Maintainer role.

Like OP, I can `git pull` the successfully but `push` fails. On the Databricks clone of the repo, all I have done is create a test file with one line in the root directory and update an existing file in the root directory with a single uncommented line. Please help!

joshuat
New Contributor III

Discovered the solution to my problem - Databricks Git integration does not support the use of project-level access tokens. It only supports the use of user-level personal access tokens. When I switched my Git credentials to use a personal access token AND my corporate email according to GitLab, it worked.

Databricks Git integration does not support the use of project-level access tokens 

Thank you for reporting this issue. Gitlab project access tokens stopped working sometime after May 2024. The issue is on our backlog. Are you able to use an alternative to unblock your work?

joshuat
New Contributor III

Thanks for your reply - I did, see my reply above.

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