certbot-auto报错,无法更新证书解决
在使用Let’s Encrypt 的免费证书后,需要每三个月更新一次证书,因为免费证书的有效日期只有三个月,而certbot-auto提供了一个方法,续签证书
./certbot-auto renew --quiet
该命令将检查服务器上的证书是否将在未来30天内过期,如果是,则进行更新,后面可以加上–quiet 指令告诉 certbot 不要生成输出。
可以将其放到计划任务中,每天执行
不过目前证书有效期已经不到一个月了,但是证书并没有去更新
查看了定时任务,发现命令有被执行,但是证书并没有更新
Jan 12 03:00:01 localhost CROND[15033]: (root) CMD (/linggan/certbot-auto renew --quiet)
Jan 12 03:01:01 localhost CROND[15085]: (root) CMD (run-parts /etc/cron.hourly)
Jan 12 03:01:01 localhost run-parts(/etc/cron.hourly)[15085]: starting 0anacron
手动执行命令:
[root@localhost ~]# ./certbot-auto renew
Upgrading certbot-auto 1.10.1 to 1.11.0...
Couldn't download https://raw.githubusercontent.com/certbot/certbot/v1.11.0/letsencrypt-auto-source/letsencrypt-auto. <urlopen error [E