Support Forums

Deploy preview collaboration with GitLab self-managed?


I’m happy to hear the collaborative deploy-previews are supported on GitLab :grinning:.

However, I’m wondering if this is also supported for self-managed GitLab instances. I do have issues getting my personal access token being accepted in the Connect Netlify to GitLab self-managed window.

This is for the sigasi-insights.netlify.app site.


Hi @bart.brosens!

Yes! Netlify recently announced collaborative Deploy Previews are supported on GitLab self-hosted instances, available for teams on Business plans or above. :tada: :raised_hands:t4:

Now onto the issue you’re encountering. When you say:

I do have issues getting my personal access token being accepted in the Connect Netlify to GitLab self-managed window.

I think this could be related to one of the following issues:

  1. The personal access token you generated doesn’t have enough scope (it specifically needs the api scope), or
  2. The GitLab user role you created the access token from is not high enough (it specifically needs to be created by a Reporter or above)

We have docs about troubleshooting GitLab user issues with collaborative Deploy Previews that should prove helpful here.

(Note: Steps 1 - 5 are about making comments from the drawer appear to come from the Netlify bot, but you can follow the same steps for your personal GitLab account if you don’t want to add a new seat to your GitLab team.)

Please do keep us updated if this resolves your issue!

Hi Brad,

Thank you for your answer. The link to the troubleshooting docs is useful, however, I don’t recognize my issue there.

All I get is a Please try again error message when trying to save my freshly created personal access token (which has the api scope). I’m attaching a screenshot showing this.

Screenshot from 2021-11-08 10-41-15

Is there some way for me to see any logs associated to this to get more info?

Thanks again for bringing this to our attention @bart.brosens! :slightly_smiling_face:

After further investigation, we think your issue is related to the way we infer a GitLab instance’s URL from the commit URL of the deploy. If the API request to get the details of the deploy failed, then the value we had for the GitLab instance’s URL would be blank, preventing you from being able to log in successfully.

We just pushed a change to fix this behavior. Now, if the value is blank, we prompt users to input that value themselves. Please try again and let us know if it works. :wrench:

We hope this fix solves your issue! :crossed_fingers:t4:


Hi @johnson_brad ,

Thank you for your feedback. I do see a change: the white square between the Netlify and GitLab logos now is a double arrow (<->). However, apart from that, I don’t get a chance to input any value and the same Please try again. message from my screenshot shows up.

In the URL from the dialog I do see the URL of our GitLab instance: https://app.netlify.com/cdp/auth/token?service=gitlab_self_hosted&host=https://gitlab.<ourcompany.com>. Maybe that explains why I don’t get a prompt?

Something else I’m thinking about: I’m using the gitlab.com SSO to authenticate on Netlify. Could that explain this issue? :thinking:

Thanks for the additional information @bart.brosens. We’re still digging in to try and identify the issue at play here.

Can you please report back the details of the error in the Network tab of your browser devtools when you try to save the token? This should help us figure out what’s going on.

Hi @johnson_brad ,

Thank you for your continued support. I’m adding a screenshot of the network tab.

When clicking the line with status 400, I get the following.

{code: 400, msg: “No provider found with the slug gitlab_self_hosted”,…}
code: 400
error_id: “63d0721e-bcd9-4a8f-bdea-1694758beb58”
msg: “No provider found with the slug gitlab_self_hosted”

Hope this helps to figure out more!

Thank you for the extra information @bart.brosens! :white_check_mark:

With this info, we were able to reproduce your issue on our side (it was a config issue). We have deployed a fix and retested OK. As we were no longer able to reproduce the issue, we’d be surprised if you encounter the issue again. :netlisparkles:

Please try one more time and let us know if your issue has been resolved. Thank you again for your patience! :netliheart:


@johnson_brad This resolved the issue :+1: :heart_eyes_cat:

1 Like