Getting Lego error passing email address using --email

别来无恙 提交于 2019-12-13 03:14:37

问题


To renew a LetsEncrypt certificate I was following this Bitnami doc and:

sudo /opt/bitnami/letsencrypt/lego --tls --email="somebody@example.com" --domains="example.com" --domains="www.example.com" --path="/opt/bitnami/letsencrypt" renew --days 90

kept returning the error:

You have to pass an account (email address) to the program using --email or -m

I tried retyping the hyphens and quotations in case they were being changed to en dashes and inverted commas in copy/paste, but no luck. Appreciate pointers to what I may be doing wrong or could do differently.


回答1:


Bitnami Engineer here. It seems you have an old version of the lego binary in your instance, you have 2 options:

  • Use that previous version: In this case you will need to run this command instead
sudo /opt/bitnami/letsencrypt/lego --email="somebody@example.com" --domains="example.com" --domains="www.example.com" --path="/opt/bitnami/letsencrypt" renew --days 90

Note: I removed the --tls parameter

  • Update the lego binary
cd /tmp
curl -Ls https://api.github.com/repos/xenolf/lego/releases/latest | grep browser_download_url | grep linux_amd64 | cut -d '"' -f 4 | wget -i -
tar xf lego_v2.6.0_linux_amd64.tar.gz
sudo mkdir -p /opt/bitnami/letsencrypt
sudo mv lego /opt/bitnami/letsencrypt/lego

Note: 2.6.0 was the latest version of the lego binary when writing this message

and then run your command again

sudo /opt/bitnami/letsencrypt/lego --tls --email="somebody@example.com" --domains="example.com" --domains="www.example.com" --path="/opt/bitnami/letsencrypt" renew --days 90

I hope this helps



来源:https://stackoverflow.com/questions/56516853/getting-lego-error-passing-email-address-using-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!