Daniel Conlin Jr.
Daniel Conlin Jr.

Reputation: 23

Gitlab Enterprise Edition HTTPS

I'm setting up gitlab-ee with out a liscense. I want to to have https but its giving me this error

Recipe: letsencrypt::http_authorization * letsencrypt_certificate[gitlab.example.com] action create * acme_certificate[staging] action create * file[gitlab.example.com SSL key] action create_if_missing (up to date)

  ================================================================================
  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

Running handlers: There was an error running gitlab-ctl reconfigure:

letsencrypt_certificate[gitlab.example.com] (letsencrypt::http_authorization line 5) had an error: 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

I dont see why its making it fail the creation of certifications. Its creating them and storing them in /etc/gitlab/sslanyone able to help?

Upvotes: 2

Views: 2679

Answers (1)

Robin
Robin

Reputation: 1736

Just for posterity, to complete @Rafael Pardini's answer, the mentioned solution boils down to simply commenting the acme_certificate 'staging' block (from do to end) inside the /opt/gitlab/embedded/cookbooks/letsencrypt/resources/certificate.rb file.

Upvotes: 2

Related Questions