root@gitea1:~# ./certbot-venv/bin/certbot certificates
An unexpected error occurred:
AttributeError: module 'certbot.interfaces' has no attribute 'IAuthenticator'
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-o49wfp6z/log or re-run Certbot with -v for more details.
root@gitea1:~# ./certbot-venv/bin/python -m pip install --upgrade certbot 
Requirement already satisfied: certbot in ./certbot-venv/lib/python3.9/site-packages (2.0.0)
Collecting certbot
  Downloading certbot-2.1.0-py3-none-any.whl (267 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 267.1/267.1 kB 10.4 MB/s eta 0:00:00
Requirement already satisfied: pytz>=2019.3 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (2022.4)
Requirement already satisfied: ConfigArgParse>=0.9.3 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (1.5.3)
Requirement already satisfied: cryptography>=2.5.0 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (38.0.1)
Requirement already satisfied: setuptools>=41.6.0 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (65.4.1)
Requirement already satisfied: distro>=1.0.1 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (1.7.0)
Requirement already satisfied: pyrfc3339 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (1.1)
Requirement already satisfied: josepy>=1.13.0 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (1.13.0)
Requirement already satisfied: configobj>=5.0.6 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (5.0.6)
Requirement already satisfied: parsedatetime>=2.4 in ./certbot-venv/lib/python3.9/site-packages (from certbot) (2.6)
Collecting acme>=2.1.0
  Downloading acme-2.1.0-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 4.0 MB/s eta 0:00:00
Requirement already satisfied: requests>=2.20.0 in ./certbot-venv/lib/python3.9/site-packages (from acme>=2.1.0->certbot) (2.28.1)
Requirement already satisfied: PyOpenSSL>=17.5.0 in ./certbot-venv/lib/python3.9/site-packages (from acme>=2.1.0->certbot) (22.1.0)
Requirement already satisfied: six in ./certbot-venv/lib/python3.9/site-packages (from configobj>=5.0.6->certbot) (1.16.0)
Requirement already satisfied: cffi>=1.12 in ./certbot-venv/lib/python3.9/site-packages (from cryptography>=2.5.0->certbot) (1.15.1)
Requirement already satisfied: pycparser in ./certbot-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=2.5.0->certbot) (2.21)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./certbot-venv/lib/python3.9/site-packages (from requests>=2.20.0->acme>=2.1.0->certbot) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in ./certbot-venv/lib/python3.9/site-packages (from requests>=2.20.0->acme>=2.1.0->certbot) (2022.9.24)
Requirement already satisfied: charset-normalizer<3,>=2 in ./certbot-venv/lib/python3.9/site-packages (from requests>=2.20.0->acme>=2.1.0->certbot) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in ./certbot-venv/lib/python3.9/site-packages (from requests>=2.20.0->acme>=2.1.0->certbot) (3.4)
Installing collected packages: acme, certbot
  Attempting uninstall: acme
    Found existing installation: acme 2.0.0
    Uninstalling acme-2.0.0:
      Successfully uninstalled acme-2.0.0
  Attempting uninstall: certbot
    Found existing installation: certbot 2.0.0
    Uninstalling certbot-2.0.0:
      Successfully uninstalled certbot-2.0.0
Successfully installed acme-2.1.0 certbot-2.1.0

[notice] A new release of pip available: 22.2.2 -> 22.3.1
[notice] To update, run: /root/certbot-venv/bin/python -m pip install --upgrade pip
root@gitea1:~# ./certbot-venv/bin/certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: git.afpy.org
    Serial Number: 4e56d044967376ef84b43acb0880aab68f7
    Key Type: RSA
    Domains: git.afpy.org
    Expiry Date: 2023-01-05 09:37:42+00:00 (INVALID: EXPIRED)
    Certificate Path: /etc/letsencrypt/live/git.afpy.org/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/git.afpy.org/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
root@gitea1:~# ./certbot-venv/bin/certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/git.afpy.org.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Renewing an existing certificate for git.afpy.org
Waiting 10 seconds for DNS changes to propagate

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations, all renewals succeeded: 
  /etc/letsencrypt/live/git.afpy.org/fullchain.pem (success)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
root@gitea1:~#