runfalk / certbot-dns-loopia

Loopia DNS authentication plugin for Certbot
Other
37 stars 11 forks source link

certbot: error: unrecognized arguments: --dns-loopia-credentials loopia-credentials.ini #12

Closed jnssnmrcs closed 2 years ago

jnssnmrcs commented 3 years ago

Having issues getting this plugin to work. I installed certbot according to instructions on their website for Ubuntu 18 LTS. Then I installed pip3 with apt install python3-pip. Then I installed your plugin with pip3 install certbot-dns-loopia as root.

Getting the following error:

certbot certonly --authenticator dns-loopia --dns-loopia-credentials loopia-credentials.ini -d *.domain.com
usage: 
  certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...

Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. 
certbot: error: unrecognized arguments: --dns-loopia-credentials loopia-credentials.ini

whereis certbot
certbot: /usr/bin/certbot /usr/local/bin/certbot /snap/bin/certbot

which certbot
/usr/local/bin/certbot

certbot --version
certbot 1.20.0

/usr/local/bin/certbot --version
An unexpected error occurred:
pkg_resources.ContextualVersionConflict: (cryptography 2.1.4 (/usr/lib/python3/dist-packages), Requirement.parse('cryptography>=3.3'), {'PyOpenSSL'})
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/tmppkmv0dph/log or re-run Certbot with -v for more details.

/usr/bin/certbot --version
certbot 1.20.0

It appears that certbot does not recognize the plugin as installed:

certbot certonly --authenticator dns-loopia -d *.domain.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
The requested dns-loopia plugin does not appear to be installed

And if I try to remove all installations of certbot and only install using pip (apt install python-pip) I get this error:

pip install certbot-dns-loopia
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: The directory '/home/<REDACTED>/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
ERROR: Could not find a version that satisfies the requirement certbot-dns-loopia (from versions: none)
ERROR: No matching distribution found for certbot-dns-loopia

Any help getting this to work greatly appreciated.

kmpm commented 3 years ago

Installing cerbot using snap (which is the recommended method) does not work with plug-ins installed using a traditional pip method. I have started to look into how to package this plug in as a compatible snap packet but haven't had time yet.

So, at the moment you have to wait or install certbot in some other way.

jnssnmrcs commented 3 years ago

Thanks, I understand. I also tried installing both plugin and certbot with pip and pip3 but had issues with both, see updates to comment. Any tip on how to get it working?

kmpm commented 3 years ago

Please try pip3 ( uses python3 instead of python2 which pip does ) for both. Do you get the same error then (unlikely since it should use python 3.x) Python 2 is indeed not supported any more.

jnssnmrcs commented 3 years ago

I tried that but I'm getting the following error when running certbot after installing with pip3 which I'm guessing has nothing to do with this plugin:

certbot --version
An unexpected error occurred:
pkg_resources.ContextualVersionConflict: (cryptography 2.1.4 (/usr/lib/python3/dist-packages), Requirement.parse('cryptography>=3.3'), {'PyOpenSSL'})
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/tmpcj9q0dql/log or re-run Certbot with -v for more details.
jnssnmrcs commented 3 years ago

Just wanted to let you know that I tried the snap-wrapped plugin instead and that worked without any issues.