Skip to content

Commit 83d75aa

Browse files
authored
Merge pull request #111 from packagist/clarify-integration-setup
Integrations: update GitLab guides
2 parents 2090c79 + 95db4c7 commit 83d75aa

20 files changed

+76
-26
lines changed
Loading
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
+40-9
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,59 @@
11
# GitLab (Self-Managed) Integration Setup
22
## Private Packagist Cloud
33

4-
## Initial Setup
4+
<div class="row column">
5+
<div class="callout success">
6+
<p>
7+
This guide explains how to set up an OAuth integration for Private Packagist Cloud with the on-premises version of GitLab.
8+
If you use their public service on GitLab.com, these instructions are not relevant to you.
9+
</p>
10+
<p>If you are using our Self-Hosted product, please <a href="/docs/self-hosted/gitlab-integration-setup">use this guide</a>.</p>
11+
</div>
12+
</div>
13+
14+
To allow your users to authenticate to Private Packagist with their GitLab account, you'll first need to create
15+
an integration in Private Packagist. This document walks you through the required steps.
16+
17+
## Open the Add Integration form
518

619
From the organization settings page, select the "Integrations" subtab. Hit the "Add Integration" button on the integrations listing page to get to the form below.
7-
To set up a GitLab Self-Managed integration with Private Packagist, start by selecting "GitLab" as the plaform and enter the URL of your own GitLab server. A link to setup the OAuth application on your GitLab server will automatically be displayed.
20+
To set up a GitLab Self-Managed integration with Private Packagist, start by selecting "GitLab" as the platform and enter the URL of your own GitLab server.
21+
A link to setup the OAuth application on your GitLab server will automatically be displayed.
822

9-
![Packagist Setup](/Resources/public/img/docs/integration-setup/cloud/gitlab-self-managed-01-packagist-setup.png)
23+
![Packagist Setup](/Resources/public/img/docs/integration-setup/cloud/gitlab-self-managed-01-packagist-setup-20241219.png)
1024

1125
## Add an OAuth Application
1226

13-
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+
Do not submit the integration form yet, but copy the content from the "Callback URL / Redirect URL" and follow the
28+
setup link to your GitLab server. The fields Client ID and Client Secret remain empty for now.
29+
30+
On the GitLab applications page, click the "Add new application" button and fill in the form as shown here:
1431

15-
![GitLab Form](/Resources/public/img/docs/integration-setup/gitlab-02-gitlab-form.png)
32+
![GitLab Form](/Resources/public/img/docs/integration-setup/cloud/gitlab-self-managed-02-gitlab-form.png)
1633

17-
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.
34+
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.
1835

1936
If you have full admin access on GitLab, then you can also create an application in the GitLab admin section under Applications.
20-
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.
2138

22-
![GitLab Credentials](/Resources/public/img/docs/integration-setup/gitlab-03-gitlab-credentials.png)
39+
After you create the application, you will get a new Application ID and Secret. You'll need both these values to continue the set up in Private Packagist.
40+
41+
![GitLab Credentials](/Resources/public/img/docs/integration-setup/cloud/gitlab-self-managed-03-gitlab-credentials.png)
2342

2443
## Finish the Setup
2544

2645
Copy and paste the "Application Id" and "Secret" value back into the Private Packagist integration form and submit the form with the "Save Integration" button.
2746

28-
![GitLab Credentials](/Resources/public/img/docs/integration-setup/cloud/gitlab-self-managed-04-packagist-form.png)
47+
![Complete integration form](/Resources/public/img/docs/integration-setup/cloud/gitlab-self-managed-04-packagist-form-20241219.png)
48+
49+
You'll be redirected back to the list of integrations.
50+
51+
### Share the GitLab login link
52+
53+
The final step is sharing your organization-specific login link with your users. Look for the "Login link" button next to
54+
your newly created GitLab integration on the integrations page, and copy the URL.
55+
56+
![GitLab integration](/Resources/public/img/docs/integration-setup/cloud/gitlab-self-managed-05-integration.png)
57+
58+
This link presents the option to authenticate with your GitLab account and can now be used to log in to Private Packagist.
59+

docs/self-hosted/github-integration-setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A link to set up the OAuth application on GitHub will automatically be displayed
2525

2626
![Packagist Setup](/Resources/public/img/docs/integration-setup/self-hosted/github-01-packagist-setup.png)
2727

28-
## Creating an OAuth Application
28+
## Create a GitHub OAuth Application
2929
Do not submit the integration form yet, but copy the content from the "Callback
3030
URL / Redirect URL" and follow the setup link to your GitHub server. The fields
3131
Client ID and Client Secret remain empty for now.
@@ -37,7 +37,7 @@ to get a new secret. You'll need the client ID and client secret to finish the s
3737

3838
![GitHub Credentials](/Resources/public/img/docs/integration-setup/github-03-github-credentials-20241219.png)
3939

40-
## Finish the Setup
40+
## Create the integration
4141
Copy and paste the "Client ID" and "Client Secret" values back into the Private
4242
Packagist integration form and submit the form with the "Create Integration"
4343
button.
+33-14
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,51 @@
11
# GitLab Integration Setup
22
## Private Packagist Self-Hosted
33

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>
610

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.
918

1019
![Add Integration](/Resources/public/img/docs/self-hosted/08-integration-create.png)
1120

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.
1324

14-
![Packagist Setup](/Resources/public/img/docs/integration-setup/gitlab-01-packagist-setup.png)
25+
![Packagist Setup](/Resources/public/img/docs/integration-setup/self-hosted/gitlab-01-packagist-setup.png)
1526

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.
1830

19-
![GitLab Form](/Resources/public/img/docs/integration-setup/gitlab-02-gitlab-form.png)
31+
![GitLab Form](/Resources/public/img/docs/integration-setup/self-hosted/gitlab-02-gitlab-form.png)
2032

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.
2234

2335
Instead of the user settings, you can also create an application in the settings section of a GitLab group, or if you
2436
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.
2638

27-
![GitLab Credentials](/Resources/public/img/docs/integration-setup/gitlab-03-gitlab-credentials.png)
39+
![GitLab Credentials](/Resources/public/img/docs/integration-setup/self-hosted/gitlab-03-gitlab-credentials.png)
2840

29-
## Finish the Setup
41+
## Create the integration
3042
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.
3143

32-
![GitLab Credentials](/Resources/public/img/docs/integration-setup/gitlab-04-packagist-form.png)
44+
![GitLab Credentials](/Resources/public/img/docs/integration-setup/self-hosted/gitlab-04-packagist-form.png)
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+
![Available integrations](/Resources/public/img/docs/integration-setup/self-hosted/gitlab-05-integrations-overview.png)

features/integration-github-bitbucket-gitlab.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Private Packagist integrates with the following systems:
5050
* Webhooks: Code changes and releases
5151

5252
#### GitLab
53-
* OAuth: Users authenticate on Private Packagist with their GitLab accounts
53+
* OAuth: Users authenticate on Private Packagist with their GitLab accounts. If you use Private Packagist Self-Hosted, first create a GitLab app by following these [steps](../docs/self-hosted/gitlab-integration-setup.md).
5454
* Synchronization:
5555
* Keeps teams, their members, and access permissions in sync with your GitLab groups
5656
* Individual collaborators aren't supported

0 commit comments

Comments
 (0)