certbot-auto报错怎么办?免费ssl证书自动续期报错。

版权声明:转载请注明出处 https://blog.csdn.net/weixin_43420337/article/details/84954011

Let’s Encrypt颁发的通配符证书每次续期需要验证一下DNS的TXT记录,这个TXT记录的值是会发生变化的。所以续期时候需要更改下DNS的TXT记录。网上流传的都是php版本的脚本。还要写shell+php,挺麻烦的。这里我自己用go写了一个更新DNS记录的小程序

The error was: PluginError(‘An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.’,). Skipping.
All renewal attempts failed. The following certs could not be renewed:

  1. 先配置两个环境变量,最好写在/etc/profile,或者.bashrc里面,然后执行source生效
# 阿里云的access key和secret
export CERTBOT_ALI_KEY=""
export CERTBOT_ALI_SECRET=""
  1. 下载certbot-alidns放到/usr/bin/就可以了。
# 用法
certbot-auto renew --cert-name shuaibo.wang --manual-auth-hook /usr/bin/certbot-alidns
  1. 重新加载下ssl证书
nginx -s reload

certbot-alidns下载
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43420337/article/details/84954011