我正在无权设置gitlab-ee。我想拥有https,但它给了我这个错误
配方:letsencrypt :: http_authorization * letsencrypt_certificate [gitlab.example.com]操作创建 * acme_certificate [staging]操作创建 * file [gitlab.example.com SSL密钥]操作create_if_missing(最新)
================================================================================
Error executing action `create` on resource 'acme_certificate[staging]'
================================================================================
Acme::Client::Error::Malformed
------------------------------
Method not allowed
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/acme/resources/certificate.rb:77:in `block in class_from_file'
Resource Declaration:
---------------------
suppressed sensitive resource output
Compiled Resource:
------------------
suppressed sensitive resource output
System Info:
------------
chef_version=14.13.11
platform=ubuntu
platform_version=18.04
ruby=ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
================================================================================
Error executing action `create` on resource 'letsencrypt_certificate[gitlab.example.com]'
================================================================================
Acme::Client::Error::Malformed
------------------------------
acme_certificate[staging] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/resources/certificate.rb line 25) had an error: Acme::Client::Error::Malformed: Method not allowed
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/acme/resources/certificate.rb:77:in `block in class_from_file'
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/recipes/http_authorization.rb
5: letsencrypt_certificate site do
6: crt node['gitlab']['nginx']['ssl_certificate']
7: key node['gitlab']['nginx']['ssl_certificate_key']
8: notifies :run, "execute[reload nginx]", :immediate
9: notifies :run, 'ruby_block[display_le_message]'
10: only_if { omnibus_helper.service_up?('nginx') }
11: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/recipes/http_authorization.rb:5:in `from_file'
letsencrypt_certificate("gitlab.example.com") do
action [:create]
default_guard_interpreter :default
declared_type :letsencrypt_certificate
cookbook_name "letsencrypt"
recipe_name "http_authorization"
crt "/etc/gitlab/ssl/gitlab.example.com.crt"
key "/etc/gitlab/ssl/gitlab.example.com.key"
alt_names []
cn "gitlab.example.com"
only_if { #code block }
end
System Info:
------------
chef_version=14.13.11
platform=ubuntu
platform_version=18.04
ruby=ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
运行处理程序: 运行gitlab-ctl重新配置时出错:
letsencrypt_certificate [gitlab.example.com](letsencrypt :: http_authorization第5行)出现错误:Acme :: Client :: Error :: Malformed:acme_certificate [staging](/ opt / gitlab / embedded / cookbooks / cache / cookbooks / letsencrypt / resources / certificate.rb第25行)出现错误:Acme :: Client :: Error :: Malformed:不允许使用方法
我不明白为什么它使创建证书失败。它会创建它们并将其存储在/etc/gitlab/ssl
任何可以提供帮助的人中?
答案 0 :(得分:1)
为了后代,要完成@Rafael Pardini的回答,上述解决方案归结为简单地在acme_certificate 'staging'
内注释do
块(从end
到/opt/gitlab/embedded/cookbooks/letsencrypt/resources/certificate.rb
)文件。
答案 1 :(得分:0)
我和https://gitlab.com/gitlab-org/gitlab/issues/38255的很多人都遇到了同样的问题。您应该尝试使用@Azylog描述的解决方案。