Refused to connect to self-hosted GitLab instance
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)
- 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
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.
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
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.
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.
Thank you for the quick turnaround. This looks like it will work for my needs.
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