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 !

4 REPLIES 4

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/

Kaniz_Fatma
Community Manager
Community Manager

Hi @Giorgi ARABIDZEโ€‹ , We haven't heard from you on the last response from @Hubert Dudekโ€‹, and I was checking back to see if his suggestions helped you.

Or else, If you have any solution, please share it with the community as it can be helpful to others.

Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.

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.

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!