Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d7ba7178
Commit
d7ba7178
authored
Sep 20, 2021
by
Anton Smith
Committed by
Evan Read
Sep 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GitLab OmniAuth provider - update code snippet for changing GitLab URL
parent
842e04e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
doc/integration/gitlab.md
doc/integration/gitlab.md
+24
-2
No files found.
doc/integration/gitlab.md
View file @
d7ba7178
...
...
@@ -48,7 +48,7 @@ GitLab.com generates an application ID and secret key for you to use.
1.
See
[
Initial OmniAuth Configuration
](
omniauth.md#initial-omniauth-configuration
)
for initial settings.
1.
Add the provider configuration:
For Omnibus installations:
For Omnibus installations
authenticating against
**GitLab.com**
:
```
ruby
gitlab_rails
[
'omniauth_providers'
]
=
[
...
...
@@ -61,7 +61,20 @@ GitLab.com generates an application ID and secret key for you to use.
]
```
For installations from source:
Or, for Omnibus installations authenticating against a different GitLab instance:
```
ruby
gitlab_rails
[
'omniauth_providers'
]
=
[
{
"name"
=>
"gitlab"
,
"app_id"
=>
"YOUR_APP_ID"
,
"app_secret"
=>
"YOUR_APP_SECRET"
,
"args"
=>
{
"scope"
=>
"api"
,
"client_options"
=>
{
"site"
=>
"https://gitlab.example.com/api/v4"
}
}
}
]
```
For installations from source authenticating against
**GitLab.com**
:
```
yaml
-
{
name
:
'
gitlab'
,
...
...
@@ -70,6 +83,15 @@ GitLab.com generates an application ID and secret key for you to use.
args
:
{
scope
:
'
api'
}
}
```
Or, for installations from source to authenticate against a different GitLab instance:
```
yaml
-
{
name
:
'
gitlab'
,
app_id
:
'
YOUR_APP_ID'
,
app_secret
:
'
YOUR_APP_SECRET'
,
args
:
{
scope
:
'
api'
,
"
client_options"
:
{
"
site"
:
'
https://gitlab.example.com/api/v4'
}
}
```
1.
Change
`'YOUR_APP_ID'`
to the Application ID from the GitLab.com application page.
1.
Change
`'YOUR_APP_SECRET'`
to the secret from the GitLab.com application page.
1.
Save the configuration file.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment