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
72611f9c
Commit
72611f9c
authored
Apr 19, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auth token
parent
0ca8db25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
config/gitlab.yml.example
config/gitlab.yml.example
+10
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
lib/api/auth.rb
lib/api/auth.rb
+2
-1
No files found.
config/gitlab.yml.example
View file @
72611f9c
...
...
@@ -176,6 +176,16 @@ production: &base
repository_archive_cache_worker:
cron: "0 * * * *"
registry:
# enabled: true
# host: localhost
# port: 5000
# https: false
# internal_host: localhost
# key: config/registry.key
# issuer: omnibus-certificate
# path: shared/registry
#
# 2. GitLab CI settings
# ==========================
...
...
config/initializers/1_settings.rb
View file @
72611f9c
...
...
@@ -275,6 +275,7 @@ Settings.registry['registry'] = false if Settings.registry['enabled'].nil?
Settings
.
registry
[
'path'
]
=
File
.
expand_path
(
Settings
.
registry
[
'path'
]
||
File
.
join
(
Settings
.
shared
[
'path'
],
"registry"
),
Rails
.
root
)
Settings
.
registry
[
'host'
]
||=
"example.com"
Settings
.
registry
[
'internal_host'
]
||=
"localhost"
Settings
.
registry
[
'key'
]
||=
nil
Settings
.
registry
[
'https'
]
=
false
if
Settings
.
registry
[
'https'
].
nil?
Settings
.
registry
[
'port'
]
||=
Settings
.
registry
.
https
?
443
:
80
Settings
.
registry
[
'protocol'
]
||=
Settings
.
registry
.
https
?
"https"
:
"http"
...
...
lib/api/auth.rb
View file @
72611f9c
...
...
@@ -119,12 +119,13 @@ module API
name:
@path
,
actions:
@actions
],
iss:
Gitlab
.
config
.
registry
.
issuer
,
exp:
Time
.
now
.
to_i
+
3600
}
end
def
private_key
@private_key
||=
OpenSSL
::
PKey
::
RSA
.
new
File
.
read
'config/registry.key'
@private_key
||=
OpenSSL
::
PKey
::
RSA
.
new
File
.
read
Gitlab
.
config
.
registry
.
key
end
def
encode
(
payload
)
...
...
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