Registry tab not working

I installed gitlab on an AWS server and it works as expected.

http://ec2-54-167-34-63.compute-1.amazonaws.com/

But when I click on the "Registry" tab, the page is displayed error not found (500)


Relevant part from /etc/gitlab/gitlab.rb

gitlab_rails['gitlab_default_projects_features_container_registry'] = true

# registry_external_url 'https://registry.gitlab.example.com'
registry_external_url 'http://ec2-54-167-34-63.compute-1.amazonaws.com:4567'

# Settings used by GitLab application
gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "http://ec2-54-167-34-63.compute-1.amazonaws.com"
gitlab_rails['registry_port'] = "5005"
gitlab_rails['registry_api_url'] = "http://localhost:5000"
gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key"
gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"
gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer"

# Settings used by Registry application
registry['enable'] = true
registry['username'] = "registry"
registry['group'] = "registry"
registry['uid'] = nil
registry['gid'] = nil
registry['dir'] = "/var/opt/gitlab/registry"
registry['log_directory'] = "/var/log/gitlab/registry"
registry['log_level'] = "info"
registry['rootcertbundle'] = "/var/opt/gitlab/registry/certificate.crt"
registry['storage_delete_enabled'] = true

Update

According to the logs below, I need the gitlab-registry.key file in the right place. What is this file and how to create it?

tail / var / log / gitlab / gitlab-rails / production.log

Started GET "/root/test/container_registry" for 125.99.49.46 at 2016-10-24 08:29:27 +0000
Processing by Projects::ContainerRegistryController#index as HTML
  Parameters: {"namespace_id"=>"root", "project_id"=>"test"}
Completed 500 Internal Server Error in 23ms (ActiveRecord: 3.5ms)

Errno::ENOENT (No such file or directory @ rb_sysopen - /var/opt/gitlab/gitlab-rails/etc/gitlab-registry.key):
  lib/json_web_token/rsa_token.rb:20:in `read'
  lib/json_web_token/rsa_token.rb:20:in `key_data'
  lib/json_web_token/rsa_token.rb:24:in `key'
  lib/json_web_token/rsa_token.rb:28:in `public_key'
  lib/json_web_token/rsa_token.rb:33:in `kid'
  lib/json_web_token/rsa_token.rb:12:in `encoded'
  app/services/auth/container_registry_authentication_service.rb:30:in `full_access_token'
  app/models/project.rb:421:in `container_registry_repository'
  app/controllers/projects/container_registry_controller.rb:28:in `container_registry_repository'
  app/controllers/projects/container_registry_controller.rb:8:in `index'
  lib/gitlab/request_profiler/middleware.rb:15:in `call'
  lib/gitlab/middleware/go.rb:16:in `call'

Update 2

I think I need to create a certificate as described here ...

http://www.bonusbits.com/wiki/HowTo:Setup_HTTPS_for_Gitlab

+4
source share
3 answers

GitLab ( 500. : issue 23019)

GitLab 8.13 : 23575: , 7037: , .
.

23339 " ( , gitlab)": .

23181 ( unauthorized: authentication required) , 1.11+ ( AWS)


gitlab-registry.key, OP, reconfigure, .

, :

, .
registry_nginx["ssl_certificate"] not registry_nginx[ssl_certificate].

+1

, :

registry_external_url 'http://ec2-54-167-34-63.compute1.amazonaws.com:4567'

gitlab_rail['registry'] registry['xxxxx'], , , , .

, gitlab.rb, :

registry_nginx['ssl_certificate'] = "/path/to/my/cert.crt"
registry_nginx['ssl_certificate_key'] = "/path/to/my/key.key"

, GitLab:

sudo gitlab-rake gitlab:check
+1

Like deporclick , install your registry certificates as:

registry_nginx['ssl_certificate'] = "/path/to/my/cert.crt"
registry_nginx['ssl_certificate_key'] = "/path/to/my/key.key"
Run codeHide result
0
source

Source: https://habr.com/ru/post/1658076/


All Articles