certbot: error: unrecognized arguments: --dns-digitalocean-credentials
Solution 1:
I received the unrecognized arguments: --dns-digitalocean-credentials
error even with Certbot version 0.40.0 (default deb package for Ubuntu 20.04). The man page describes --dns-digitalocean-credentials
but it isn't recognized.
The solution is to install via a snap:
sudo apt purge -y certbot
sudo snap install --classic certbot
sudo snap set certbot trust-plugin-with-root=ok
sudo snap install certbot-dns-digitalocean
As of this posting, this yields Certbot 1.9.0, which worked well to generate and install my wildcard TLS certificate.
You didn't ask, but here is the full Certbot command I used:
sudo certbot run --domain example.com --domain '*.example.com' --authenticator dns-digitalocean --installer apache --dns-digitalocean-credentials /root/.certbot.token --dns-digitalocean-propagation-seconds 60 --agree-tos --keep-until-expiring --redirect --hsts --uir --email [email protected] --no-eff-email