【发布时间】:2020-11-17 05:50:43
【问题描述】:
我已经在我的服务器上安装了 gitlab-ce 13.2.0,并且容器注册表立即可用。
我可以从其他服务器(或我的本地计算机)登录,但将图像推送到容器注册表时出现 404 错误:error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE html>\n<html>\n<head>...
在我的 gitlab.rb 我有:
external_url 'https://git.xxxxxxxx.com'
nginx['enable'] = true
nginx['client_max_body_size'] = '250m'
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/trusted-certs/xxxxxxxx.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/trusted-certs/xxxxxxxx.com.key"
nginx['ssl_protocols'] = "TLSv1.1 TLSv1.2"
registry_external_url 'https://git.xxxxxxxx.com'
令人困惑的是registry_external_url 与external_url 相同。 gitlab.rb 中有这些行:
### Settings used by GitLab application
# gitlab_rails['registry_enabled'] = true
# gitlab_rails['registry_host'] = "git.xxxxxxxx.com"
# gitlab_rails['registry_port'] = "5005"
# gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"
但是当我取消注释时,我无法登录。
这可能是什么问题?
【问题讨论】:
-
我也有同样的问题。
-
gitlab_rails['registry_...'] 是综合 nginx 反向代理到注册表服务器(内部)的设置。 registry[...] 是注册表服务器的设置(确保 registry['enables'] = true)。 nginx[...] 是综合 nginx 的常规设置。 external_url是综合nginx的通用服务器域。