Letsencrypt如何使用--preferred-challenge

Bob*_*ijt 9 lets-encrypt

这个命令:

$ letsencrypt certonly --manual --preferred-challenges dns --email foo@bar.com --domains test001.bar.com
Run Code Online (Sandbox Code Playgroud)

输出:

letsencrypt: error: unrecognized arguments: --preferred-challenges dns
Run Code Online (Sandbox Code Playgroud)

从这里的文档:https://certbot.eff.org/docs/using.html#certbot-command-line-options

我发现:

  --preferred-challenges PREF_CHALLS
                        A sorted, comma delimited list of the preferred
                        challenge to use during authorization with the most
                        preferred challenge listed first (Eg, "dns" or "tls-
                        sni-01,http,dns"). Not all plugins support all
                        challenges. See
                        https://certbot.eff.org/docs/using.html#plugins for
                        details. ACME Challenges are versioned, but if you
                        pick "http" rather than "http-01", Certbot will select
                        the latest version automatically. (default: [])
Run Code Online (Sandbox Code Playgroud)

为什么我会收到此错误?

Bob*_*ijt 10

找到答案,虽然该网站说明letsencrypt并且certbot是相同的.似乎并非如此.

$ apt-get install letsencrypt
$ apt-get install python-pip
$ pip install --upgrade pip
$ pip install certbot
$ certbot certonly --manual --preferred-challenges dns --email foo@bar.com --domains test001.bar.com
Run Code Online (Sandbox Code Playgroud)

诀窍