|
1 | 1 | # GitLab Integration Setup
|
2 | 2 | ## Private Packagist Self-Hosted
|
3 | 3 |
|
4 |
| -This guide explains how to setup an OAuth integration for Private Packagist Self-Hosted with either the on-premises version of GitLab, or their public service on gitlab.com. |
5 |
| -If you are using our cloud product at packagist.com, [use this guide](../cloud/gitlab-integration-setup.md). |
| 4 | +<div class="row column"> |
| 5 | + <div class="callout success"> |
| 6 | + <p>This guide explains how to set up an OAuth integration for Private Packagist Self-Hosted with either the on-premises version of GitLab, or their public service on GitLab.com.</p> |
| 7 | + <p>If you are using our Cloud product at packagist.com, <a href="/docs/cloud/gitlab-integration-setup">use this guide</a>.</p> |
| 8 | + </div> |
| 9 | +</div> |
6 | 10 |
|
7 |
| -## Initial Setup |
8 |
| -Hit the "Add Integration" button on the admin page in Private Packagist Self-Hosted to get to the form below. |
| 11 | +To allow your users to authenticate to Private Packagist Self-Hosted with their GitLab account, you'll |
| 12 | +first need to create an integration in Private Packagist. This document walks you through the required steps. |
| 13 | + |
| 14 | +## Open the Add Integration form |
| 15 | +Go to the Admin section and hit the “Add Integration“ button to open the form to create your integration. If you've just |
| 16 | +installed Private Packagist Self-Hosted and it is still running in Setup Mode, you do not need to log in. If the application |
| 17 | +is no longer in Setup mode, you will have to log in with an admin account first. |
9 | 18 |
|
10 | 19 | 
|
11 | 20 |
|
12 |
| -To setup a GitLab integration with Private Packagist start by selecting "GitLab" as the platform and enter the URL of your own GitLab server or use <i>https://gitlab.com</i> for the public GitLab server as seen in the example below. A link to setup the oauth application on GitLab will automatically be displayed. |
| 21 | +To set up a GitLab integration with Private Packagist start by selecting "GitLab" as the platform and enter the URL of |
| 22 | +your own GitLab server or use <i>https://gitlab.com</i> for the public GitLab server as seen in the example below. |
| 23 | +A link to set up the OAuth application on GitLab will automatically be displayed. |
13 | 24 |
|
14 |
| - |
| 25 | + |
15 | 26 |
|
16 |
| -## Add an OAuth Application |
17 |
| -Do not submit the integration form yet, but copy the content from the "Callback URL / Redirect URL" and follow the setup link to your GitLab server. |
| 27 | +## Create a GitLab OAuth Application |
| 28 | +Do not submit the integration form yet, but copy the content from the "Callback URL / Redirect URL" and follow the |
| 29 | +setup link to your GitLab server. The fields Client ID and Client Secret remain empty for now. |
18 | 30 |
|
19 |
| - |
| 31 | + |
20 | 32 |
|
21 |
| -Make sure the "api" and "read_user" scopes are both checked and save the new application. This will reveal the credentials required to finish the setup on Private Packagist. |
| 33 | +Make sure the `api` and `read_user` scopes are both checked and save the new application. This will reveal the credentials required to finish the setup on Private Packagist. |
22 | 34 |
|
23 | 35 | Instead of the user settings, you can also create an application in the settings section of a GitLab group, or if you
|
24 | 36 | have full admin access on GitLab in the GitLab admin section under Applications.
|
25 |
| -There are two additional checkmarks on that page: "trusted" should remain unchecked, and "confidential" should remain checked. |
| 37 | +There are two additional checkmarks on that page: `trusted` should remain unchecked, and `confidential` should remain checked. |
26 | 38 |
|
27 |
| - |
| 39 | + |
28 | 40 |
|
29 |
| -## Finish the Setup |
| 41 | +## Create the integration |
30 | 42 | Copy and paste the "Application Id" and "Secret" value back into the Private Packagist integration form and submit the form with the "Create Integration" button.
|
31 | 43 |
|
32 |
| - |
| 44 | + |
| 45 | + |
| 46 | +The GitLab integration will be created and you will be redirected to the admin page. |
| 47 | + |
| 48 | +The new integration will be shown in the list of available integrations, and your users can |
| 49 | +now log in to your Private Packagist Self-Hosted installation using their GitLab account. |
| 50 | + |
| 51 | + |
0 commit comments