3

diagrams.net (formerly known as draw.io) integrates with GitLab. However, when I try to authenticate, it redirects me to gitlab.com when I'd like to connect to a self-hosted GitLab instance at company.gitlab.com. How do I tell diagrams.net to authenticate to my self-hosted GitLab instance instead?

1
  • A year has passed. Have you found a solution for your problem?
    – OneWorld
    Aug 25, 2021 at 8:51

1 Answer 1

4

You can only do that with a self-hosted draw.io instance. You also need to have your gitlab admin configure an application first.

In short:

  1. Add application to gitlab.company.com. The REDIRECT_URI would be something like https://drawio.company.com/gitlab.html (the gitlab.html is important)
  2. The Application ID needs to go to draw.io conf file as window.DRAWIO_GITLAB_ID
  3. In the same config set window.DRAWIO_GITLAB_URL to your gitlab instance, like https://gitlab.company.com
  4. The secret token from gitlab is not required.

If you run your self-hosted draw.io in docker, you can pass the configuration as env vars. In this case omit the window. part

1
  • Hi @Mike Hofmann, I followed your instructions but it's not working, it redirects to gitlab instead of .html and if I add .html after it redirects, it doesn't do anything Aug 20, 2021 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.