tengattack / certbot-dns-dnspod

A certbot dns plugin to obtain certificates using dnspod.
Other
65 stars 18 forks source link

certbot: error: unrecognized arguments: --dns-dnspod-credentials #18

Open sbwfnhn opened 5 months ago

sbwfnhn commented 5 months ago
[root@host-10 ~] python --version
Python 3.9.16

[root@host-10 ~]# cat /etc/redhat-release 
Rocky Linux release 9.2 (Blue Onyx)
[root@localhost ~]# certbot certonly -a dns-dnspod --dns-dnspod-credentials /etc/credentials.conf -d aa.chxxx.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-dnspod-credentials /etc/credentials.conf

需要创建python虚拟环境才能正确执行

#注意用root,非root下创建虚拟环境,没有权限执行certbot,使用了sudo命令提权至root账户,导制用户变更,python虚拟环境又失效。
mkdir /opt/python_env_certbot
cd /opt/python_env_certbot/
python3 -m venv certbotvenv
source certbotvenv/bin/activate
/opt/python_env_certbot/certbotvenv/bin/python3 -m pip install --upgrade pip
pip install git+https://github.com/tengattack/certbot-dns-dnspod.git

新申请

cd /opt/python_env_certbot
source certbotvenv/bin/activate
certbot certonly -a dns-dnspod \
    --dns-dnspod-credentials /etc/credentials.conf \
    -d s8.xfrx.ac.cn

续签

cd /opt/python_env_certbot
source certbotvenv/bin/activate
certbot renew --cert-name s8.xfrx.ac.cn
lindaoling commented 3 months ago

兄dei,解决了吗,我的证书过期了,也发现有这个问题