无法使用certbot更新/ Letsencrypt更新证书

时间:2020-01-31 22:15:20

标签: jenkins ssl-certificate lets-encrypt certbot

certbot与NGINX一起使用来创建证书。在我们的服务器上,仅针对生产版本,暂存版本和jenkins Web服务器创建了一个证书。

当我运行certbot renew时,一切正常,直到它尝试挑战jenkins服务器为止。我收到以下错误

Attempting to renew cert (my.domain) from /etc/letsencrypt/renewal/my.domain.conf produced an unexpected error: Missing command line flag or config entry for this setting:
Select the webroot for jenkins.my.domain:
Choices: ['Enter a new webroot']

(You can set this with the --webroot-path flag). Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/my.domain/mykey.pem (failure)

我不确定jenkins webroot的位置,但是我不认为它像添加到webroot底部我的letencrypt conf文件中那样简单,也许就是这样。无论哪种方式,我们将不胜感激! :)

1 个答案:

答案 0 :(得分:0)

--webroot-path是应该使用您的域名通过http访问的路径。当您在续订时首次购买证书时,将提供此证书,而无需明确提供证书。我认为续订配置文件可能有问题。

颁发证书时,默认情况下,Certbot将创建一个续订配置文件,该文件跟踪运行Certbot时选择的选项。这样,Certbot可以在续订时再次使用相同的选项。

https://certbot.eff.org/docs/using.html#modifying-the-renewal-configuration-file

我建议尝试生成新证书而不是续订。这样可以更正续订配置文件。