- GoCD server version v23.2.0 or above
- GitLab OAuth application's
ApplicationIdandClientSecret
Copy the file build/libs/gitlab-authorization-plugin-VERSION.jar to the GoCD server under ${GO_SERVER_DIR}/plugins/external
and restart the server. The GO_SERVER_DIR is usually /var/lib/go-server on Linux and C:\Program Files\Go Server
on Windows.
- Login to
GoCD serveras admin and navigate to Admin > Server Configuration > Server Configuration - Check both server site urls for HTTP and HTTPS. If one of these fields is empty, it could lead to HTTP 500 error on GitLab OAuth login.
-
Login into your GitLab/GitLab Enterprise account
-
Fill the following details for application
- Give a name to your application
- In
Redirect URI, specifyhttps://your.goserver.url/go/plugin/cd.go.authorization.gitlab/authenticate. - Ensure
Confidentialis selected. - In scopes, select
read_user(versions of this plugin before2.2requiredapiscope. This is now configurable andread_useris less permissive, thus recommended.)
-
Click Save application.
-
Note down the
Application IDandSecretof your application.
A Gitlab Access Token is only needed when wanting to use either of these two functionalities:
- Allow users to generate/issue GoCD Personal Access Tokens
- Use GoCD role configuration for authorization (mapping GitLab groups to GoCD roles/permissions)
If you want to use Gitlab only for login, and without GoCD Personal Access Token support, a GitLab Access Token is not required.
-
Login into your GitLab/GitLab Enterprise account
-
Navigate to Settings/Preferences
-
Click on Access Tokens
-
Fill the following details for access token
- Give a name to your token
- In scopes
- select
read_userif you only want to support GocD Personal Access Tokens. - select
read_apiif you also intend to configure authorizations/GoCD role mappings from Gitlab -> GoCD.
- select
-
Note down the
Token Value.
-
Login to
GoCD serveras admin and navigate to Admin > Security > Authorization Configuration -
Click on Add to create new authorization configuration
- Specify
idfor auth config - Select
GitLab OAuth authorization pluginfor Plugin id - Choose
GitLaborGitLab EnterpriseforAuthenticate with. - Specify Application ID, Client Secret and validate the Client Scopes Requested match your GitLab Application.
- Specify Personal Access Token Value if necessary (see tooltip).
- Save your configuration
- Specify








