Connecting self-hosted GitLab instances
For Workspaces, Bitrise supports connecting to self-hosted GitLab instances. Once it’s done, you can add apps to Bitrise from privately hosted repositories.
For Workspaces, Bitrise supports connecting to self-hosted GitLab instances. Connecting is simple, and once it’s done, you can add projects to Bitrise from privately hosted repositories. All functions that you got used to with publicly hosted repositories will be available!
Bitrise needs to be authorized as an application for the entire GitLab instance and then the Application Id and the Secret value belonging to the Bitrise OAuth application must be added to the Workspace on bitrise.io.
Configuring the GitLab connection
To access privately hosted GitLab repositories on Bitrise, you need to create a new OAuth application on your GitLab account, and assign the appropriate credentials to access your server.
Publicly resolvable IP address
Your self-hosted GitLab instance must have a publicly resolvable IP address, otherwise Bitrise won’t be able to connect to it.
-
Log in to your GitLab instance with root privileges. If you connect to Bitrise without root privileges, your Workspace’s other team members will not have access to the repository on the GitLab instance.
-
Go to the admin area by clicking the little wrench icon on the top menu bar.
-
On the left menu bar, select
, then click . -
In the Name field, enter a name that clearly identifies the application. For the sake of simplicity, we recommend
Bitrise
. -
In the Callback URL field, enter
https://app.bitrise.io/users/auth/gitlab/callback
. -
In the Scopes menu, check api.
-
Set the Confidential option to No.
If the newly created app is configured to be confidential, Bitrise won't be able to access it!
-
Click Application Id and a Secret. You’ll need both to connect to your GitLab instance on bitrise.io.
. On the next page, you should find the -
Log in to Bitrise and select your Workspace.
-
On the left, select
. -
Find the
section. -
Add your self-hosted GitLab credentials:
-
App ID
-
Secret
-
Self-hosted URL
-
You are done! Now you are able to access your privately hosted repositories with Bitrise.
Adding a new project from a self-hosted GitLab repository
-
Start the process of adding a new project.
-
When prompted to select your Git provider, select GitLab. Select the Self-hosted option.
-
Click
.
Once connected, proceed as usual: Adding a new project.