gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Refused to connect to self-hosted GitLab instance

Open mb1337 opened this issue 8 months ago • 6 comments

Version

0.14.16

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

GitLab integration doesn’t work for our self-hosted GitLab instance.

How to reproduce (Optional)

  1. Configure GitLab integration with instance url that is not gitlab.com

Expected behavior (Optional)

Self-hosted GitLab instances should work

Relevant log output (Optional)

Fetch API cannot load https://<self-hosted-gitlab>/api/v4/projects/<project-id>/merge_requests. Refused to connect because it violates the document’s Content Security Policy. 
gitlabListingService.svelte.ts:68

mb1337 avatar Apr 10 '25 16:04 mb1337

Thanks a lot for reporting.

I was under the impression that self-hosted instances should work, but @Caleb-T-Owens would know more about this.

Byron avatar Apr 12 '25 12:04 Byron

Hi @mb1337, and sorry for the trouble. Custom hosts are not yet supported but this is something we will be looking into adding soon. Here's the parent issue https://github.com/gitbutlerapp/gitbutler/issues/4714

krlvi avatar Apr 14 '25 12:04 krlvi

The next app release (0.14.19) will include a mechanism for adding custom CSP entries. I've also added documentation for how to configure this. If you wish to try it sooner, you can get the latest nightly build from here

Let me know if this helps.

krlvi avatar Apr 14 '25 18:04 krlvi

Other than the CSP settings, reading the docs I was under the impression that self-hosted GitLab servers are already supported, however the integration box only shows up if the target remote is set to something on gitlab.com and not when it's self-hosted.

nolith avatar Apr 15 '25 09:04 nolith

Thank you for the quick turnaround. This looks like it will work for my needs.

mb1337 avatar Apr 15 '25 13:04 mb1337

Other than the CSP settings, reading the docs I was under the impression that self-hosted GitLab servers are already supported, however the integration box only shows up if the target remote is set to something on gitlab.com and not when it's self-hosted.

Hey! Thanks for the ping. This is indeed correct - I have added an issue to track this https://github.com/gitbutlerapp/gitbutler/issues/8171

krlvi avatar Apr 15 '25 17:04 krlvi