Cloud Explainers

How to Fix Python SSL: CERTIFICATE_VERIFY_FAILED Errors

Python8 min video

Python's SSL: CERTIFICATE_VERIFY_FAILED means the check Python makes before it sends anything failed, and the words after the colon say which part. On a real Ubuntu PC we fix the common causes: a server signed by your company's own certificate authority (and why adding it to Ubuntu's list fixes curl but not requests), pip failing behind an office network that inspects HTTPS, an expired certificate and a hostname mismatch, and why verify=False is not a fix.

The error and the words after the colon

Your Python script stops with an SSL error: certificate verify failed. By the end, you'll know which fix your error needs, and why turning the check off is the one to avoid. Chris's script sends the milk tank's temperature from his family's dairy farm to the co-op, and today it stopped.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python send_reading.pyTraceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 470, in _make_request
    self._validate_conn(conn)
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1125, in _validate_conn
    conn.connect()
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 878, in connect
    wrapped_socket, is_verified = _ssl_wrap_socket_and_match_hostname(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 1080, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 437, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 481, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1042, in _create
    self.do_handshake()
  File "/usr/lib/python3.12/ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 494, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 555, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='portal.coop.lan', port=443): Max retries exceeded with url: /api/readings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/send_reading.py", line 6, in <module>
    r = requests.post(URL, json=reading, timeout=10)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 134, in post
    return request("post", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 727, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='portal.coop.lan', port=443): Max retries exceeded with url: /api/readings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

The traceback is seventy-one lines long. Only the last one matters, after the colon: unable to get local issuer certificate. Those words tell you where to fix it, and we'll see three different reasons before we're done.

The error and the words after the colon: figure of 71 lines of traceback, source: python send_reading.py on Chris's farm PC (demo_output.json)

What Python checks

Those words come from a check Python makes before it sends anything. The co-op's server answers with its certificate, a small file that says: I am portal.coop.lan, and this authority vouches for me. Python looks for that authority on its list of trusted ones. It's not there. Unable to get local issuer certificate means just that: the issuer, the authority that signed it, isn't on Python's list.

Before sending anything, Python checks who vouches for the server: diagram of send_reading.py, Python's trusted list, portal.coop.lan, Its certificate, Chris's farm PC, The dairy co-op

Think of a shop till that takes gift cards only from the brands on a list taped beside it. Bring a card from the dairy co-op's own farm store, and the till refuses it, even though the card is real. It just isn't on that till's list.

A till's list of card brands, Python's list of authorities: comparison table of At the till vs In Python, What you show, Who issued it, The check, Result

Quick fix: name the co-op's CA file

The usual fix is to tell Python which authority to trust. The co-op runs its own certificate authority, a CA for short, and it emailed Chris the CA's file. Chris's script uses a library called requests. requests checks a setting named REQUESTS_CA_BUNDLE. You give it the path to a file of authorities to trust. Set it in front of the command, point it at the co-op's file, and the reading is sent.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ ls ~/Downloadscoop-root-ca.crt
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ REQUESTS_CA_BUNDLE=~/Downloads/coop-root-ca.crt python send_reading.pyReading sent: {'saved': True, 'tank': 1}

But there's a catch. Chris's other scripts fetch from public sites, like pypi.org. Guess first: with that variable still set, does pypi.org work? No. Same words. The variable doesn't add the co-op to the list requests already has. It replaces that whole list, and the co-op's file holds just one authority. Without the variable, pypi.org answers 200 OK. So Chris needs a list with both.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ REQUESTS_CA_BUNDLE=~/Downloads/coop-root-ca.crt python fetch.py https://pypi.orgTraceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 470, in _make_request
    self._validate_conn(conn)
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1125, in _validate_conn
    conn.connect()
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 878, in connect
    wrapped_socket, is_verified = _ssl_wrap_socket_and_match_hostname(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 1080, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 437, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 481, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1042, in _create
    self.do_handshake()
  File "/usr/lib/python3.12/ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 494, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 555, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/fetch.py", line 7, in <module>
    r = requests.get(url, timeout=10, verify=check)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 87, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 727, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python fetch.py https://pypi.org200 OK

Adding the CA to Ubuntu's list

Most guides say: add the authority to the computer's own list. curl, the command line download tool, uses that list, and right now it fails the same way. On Ubuntu, copy the file into this folder, then run update-ca-certificates, both with sudo, as the administrator. One added. curl now gets the co-op's answer. Guess first: does Chris's Python script work now? It doesn't. Same error, same words.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ curl https://portal.coop.lan/api/readingscurl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ sudo cp ~/Downloads/coop-root-ca.crt /usr/local/share/ca-certificates/
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ sudo update-ca-certificatesUpdating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ curl https://portal.coop.lan/api/readings{"saved": true, "tank": 1}
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python send_reading.pyTraceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 470, in _make_request
    self._validate_conn(conn)
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1125, in _validate_conn
    conn.connect()
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 878, in connect
    wrapped_socket, is_verified = _ssl_wrap_socket_and_match_hostname(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 1080, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 437, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 481, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1042, in _create
    self.do_handshake()
  File "/usr/lib/python3.12/ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 494, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 555, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='portal.coop.lan', port=443): Max retries exceeded with url: /api/readings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/send_reading.py", line 6, in <module>
    r = requests.post(URL, json=reading, timeout=10)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 134, in post
    return request("post", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 727, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='portal.coop.lan', port=443): Max retries exceeded with url: /api/readings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

So where does requests look? requests.certs.where prints it: a file inside the virtual environment, the project's own private folder of packages, from a package called certifi. Count the authorities in each file: 113 in certifi's, 121 in Ubuntu's, now including the co-op's. Two tills, two lists, and Chris added the co-op to the list on the wrong till.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python -c 'import requests; print(requests.certs.where())'/home/chris/milk-tank/.venv/lib/python3.12/site-packages/certifi/cacert.pem
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ grep -c 'BEGIN CERT' $(python -m certifi) /etc/ssl/certs/ca-certificates.crt/home/chris/milk-tank/.venv/lib/python3.12/site-packages/certifi/cacert.pem:113
/etc/ssl/certs/ca-certificates.crt:121

The requests documentation says so in its first line on the subject: Requests uses certificates from the package certifi. Not from your operating system.

Adding the CA to Ubuntu's list: browser screenshot from the video

So point the same variable at Ubuntu's whole list instead. The path is on screen. Use export, so it stays set for this whole window. Now the reading is sent, and pypi.org answers too, because that one file holds both.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python send_reading.pyReading sent: {'saved': True, 'tank': 1}
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python fetch.py https://pypi.org200 OK

truststore: Python uses the system's list

But close this window, and tomorrow morning the reading fails again, because a variable only lasts while it's set. The tidier fix is a package called truststore. It makes Python use the operating system's own list instead of certifi's. It works on Linux, Windows and macOS. You need Python 3.10 or newer. Chris installs it with pip.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ unset REQUESTS_CA_BUNDLE
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ pip install truststoreCollecting truststore
  Downloading truststore-0.10.5-py3-none-any.whl.metadata (4.5 kB)
Downloading truststore-0.10.5-py3-none-any.whl (19 kB)
Installing collected packages: truststore
Successfully installed truststore-0.10.5

Then he adds two lines at the very top of his script, before requests is imported. Import truststore. Then truststore.inject_into_ssl. From here on, Python uses the system's list.

Two lines: ask the operating system: code change of send_reading.py, import truststore (before requests is imported), truststore.inject_into_ssl() (Python asks the system's list)

Run it, and the reading goes through with no variable at all. The co-op's certificate authority now lives in one place, Ubuntu's list, and both curl and this script find it there.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python send_reading.pyReading sent: {'saved': True, 'tank': 1}

pip behind the office's inspection proxy

Now Sarah, at the co-op office. She makes a fresh virtual environment, and pip install requests fails: five retries, then the same words, unable to get local issuer certificate. But pypi.org's certificate is fine: Chris's farm PC just fetched it. So who signed what Sarah got? openssl, a command line tool that reads certificates, shows the issuer: the co-op's own Office Inspection CA.

Sarah's laptop at the co-op office
(.venv) sarah@office-laptop:~/milk-tank$ pip install requestsWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/requests/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/requests/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/requests/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/requests/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/requests/
Could not fetch URL https://pypi.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) - skipping
ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
ERROR: No matching distribution found for requests
Sarah's laptop at the co-op office
(.venv) sarah@office-laptop:~/milk-tank$ echo | openssl s_client -proxy proxy.coop.lan:8080 -connect pypi.org:443 2>/dev/null | openssl x509 -noout -issuerissuer=O = Valley Dairy Co-op, CN = Valley Dairy Co-op Office Inspection CA

The office network checks all outgoing traffic. Its inspection proxy opens each HTTPS connection, looks inside, and hands Sarah a new certificate it signed itself. To her laptop, that signer is a stranger, so this time the problem is on her side of the network, not on the server.

The office proxy signs a new certificate for every site: diagram of Sarah's laptop, Inspection proxy, pypi.org, The co-op office network, The internet

The office's IT team hands out that authority's file. Sarah adds it to Ubuntu's list, the same two commands as Chris, and pip install requests works.

Sarah's laptop at the co-op office
(.venv) sarah@office-laptop:~/milk-tank$ sudo cp ~/Downloads/office-proxy-ca.crt /usr/local/share/ca-certificates/
Sarah's laptop at the co-op office
(.venv) sarah@office-laptop:~/milk-tank$ sudo update-ca-certificatesUpdating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Sarah's laptop at the co-op office
(.venv) sarah@office-laptop:~/milk-tank$ pip install requestsCollecting requests
  Downloading requests-2.34.2-py3-none-any.whl.metadata (4.8 kB)
Collecting charset_normalizer<4,>=2 (from requests)
  Downloading charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.metadata (46 kB)
Collecting idna<4,>=2.5 (from requests)
  Downloading idna-3.20-py3-none-any.whl.metadata (7.2 kB)
Collecting urllib3<3,>=1.26 (from requests)
  Downloading urllib3-2.8.0-py3-none-any.whl.metadata (7.4 kB)
Collecting certifi>=2023.5.7 (from requests)
  Downloading certifi-2026.11.20-py3-none-any.whl.metadata (2.5 kB)
Downloading requests-2.34.2-py3-none-any.whl (73 kB)
Downloading certifi-2026.11.20-py3-none-any.whl (127 kB)
Downloading charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (246 kB)
Downloading idna-3.20-py3-none-any.whl (69 kB)
Downloading urllib3-2.8.0-py3-none-any.whl (135 kB)
Installing collected packages: urllib3, idna, charset_normalizer, certifi, requests
Successfully installed certifi-2026.11.20 charset_normalizer-3.5.2 idna-3.20 requests-2.34.2 urllib3-2.8.0

That worked because pip reads the system's list. Ubuntu's own pip does this. And pip's documentation says that since version 24.2, every pip checks the system's list as well as certifi's.

pip behind the office's inspection proxy: browser screenshot from the video

Expired, or the wrong name

Not every reason after the colon is about a list. Chris's older script still posts to the co-op's old address, tank.coop.lan. There, the reason is: certificate has expired. openssl shows its end date: the first of October 2026. No setting on the farm PC fixes that. The co-op has to renew it, or Chris moves the script to the current address.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python fetch.py https://tank.coop.lanTraceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 470, in _make_request
    self._validate_conn(conn)
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1125, in _validate_conn
    conn.connect()
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 878, in connect
    wrapped_socket, is_verified = _ssl_wrap_socket_and_match_hostname(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 1080, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 437, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 481, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/truststore/_api.py", line 134, in wrap_socket
    ssl_sock = self._ctx.wrap_socket(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1042, in _create
    self.do_handshake()
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/truststore/_api.py", line 109, in do_handshake
    ret = super().do_handshake(block)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 494, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 555, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='tank.coop.lan', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/fetch.py", line 9, in <module>
    r = requests.get(url, timeout=10, verify=check)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 87, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 727, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='tank.coop.lan', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)')))
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ echo | openssl s_client -connect tank.coop.lan:443 2>/dev/null | openssl x509 -noout -enddatenotAfter=Oct  1 00:00:00 2026 GMT

And this one. Chris types just portal, a short name his network also answers to. Hostname mismatch: the certificate is for portal.coop.lan, not portal. Use the full name that's on the certificate, and it's 200 OK: the request worked.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python fetch.py https://portalTraceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 470, in _make_request
    self._validate_conn(conn)
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1125, in _validate_conn
    conn.connect()
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 878, in connect
    wrapped_socket, is_verified = _ssl_wrap_socket_and_match_hostname(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 1080, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 437, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 481, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/truststore/_api.py", line 134, in wrap_socket
    ssl_sock = self._ctx.wrap_socket(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1042, in _create
    self.do_handshake()
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/truststore/_api.py", line 109, in do_handshake
    ret = super().do_handshake(block)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1320, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'portal'. (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 494, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'portal'. (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 555, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='portal', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'portal'. (_ssl.c:1000)")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chris/milk-tank/fetch.py", line 9, in <module>
    r = requests.get(url, timeout=10, verify=check)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 87, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/api.py", line 71, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/milk-tank/.venv/lib/python3.12/site-packages/requests/adapters.py", line 727, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='portal', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'portal'. (_ssl.c:1000)")))
Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python fetch.py https://portal.coop.lan200 OK

So read the words after the colon first. Each reason points somewhere else: the list on your side, the server's certificate, or the name you typed.

The words after the colon tell you where to fix it: comparison table of What it means vs Fix it, unable to get local issuer, certificate has expired, Hostname mismatch

verify=False turns the check off

Plenty of answers online say: turn verification off. Chris's fetch script has a no-verify switch, which passes verify=False to requests. With it, the expired server answers 200 OK, plus a warning that checking is strongly advised. But with the check off, Python would accept any server that answered, including someone in between, reading the farm's data. The error was the check doing its job.

Chris's farm PC
(.venv) chris@farm-pc:~/milk-tank$ python fetch.py https://tank.coop.lan --no-verify/home/chris/milk-tank/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py:1129: InsecureRequestWarning: Unverified HTTPS request is being made to host 'tank.coop.lan'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
200 OK

Python from python.org on a Mac

On a Mac with Python from python.org, every HTTPS request can fail with these same words, because that Python brings no list of its own at first. The installer leaves a file called Install Certificates.command. Double-click it once, and it installs certifi for that Python.

Python from python.org on a Mac: browser screenshot from the video

Recap

So, when Python says certificate verify failed, read the words after the colon first. If it's your own CA, use truststore or point to the CA file. If it's an office proxy, add its CA to the system's list. If it's expired or the wrong name, fix the server or the URL.

CERTIFICATE_VERIFY_FAILED: four checks: cards of Read after the colon, Your own CA, Office proxy, Expired, wrong name

If the milk readings are flowing again, a like helps YouTube show this to more beginners, and subscribing brings more fixes like this one, each tested on a real machine.

Every command and every error in this video came from a real Ubuntu PC, and the lab files are linked in the description. Thanks for watching Cloud Explainers.

Sources

Demos: four containers on our own Mac standing in for a farm PC, a co-op's server, an office proxy and a laptop; the farm, the co-op and their certificates are made up. Every command, error and number was real. Watch the full video on YouTube.

More videos

PostgreSQL9 min

Every PostgreSQL Setting to Change After You Install It

Docker9 min

What Happens When You Install Docker on Ubuntu

Python8 min

How to Fix Python 'Address Already in Use' Errors

Go (Golang)5 min

Golang Interfaces and Mocks in 5 Minutes

Git7 min

How to Fix Git 'Detached HEAD' State

Linux21 min

Linux Firewall with ufw: Full Tutorial for Beginners

Go (Golang)5 min

Golang defer Statements in 5 Minutes

Auth (OAuth, JWT)9 min

How to Fix OAuth 'invalid_grant' Errors

Databases & SQL11 min

The SQL Roadmap for Beginners

Go (Golang)5 min

Golang make() for Slices and Maps in 5 Minutes

Networking7 min

How to Fix Network 'No Route to Host' Errors on Linux

Linux6 min

How to Fix Linux 'Too Many Open Files' Errors

Django (Python web framework)11 min

Every Django Concept a Beginner Needs to Know

Linux24 min

SSH on Linux: Full Tutorial for Beginners

Go (Golang)5 min

Golang for range Loops in 5 Minutes

Databases & SQL10 min

SQL Databases: SQLite vs PostgreSQL

Django (Python web framework)10 min

The Django Roadmap for Beginners

Go (Golang)5 min

Golang Structs in 5 Minutes

Caching & Redis22 min

Redis: Full Tutorial for Beginners

Go (Golang)5 min

Golang context.Context in 5 Minutes

Databases & SQL7 min

How to Fix MySQL Database Error 1045: Access Denied for User

Go (Golang)5 min

Golang Method Receivers in 5 Minutes

Django (Python web framework)9 min

How to Fix Django Static Files Not Loading in Production

OpenRouter (one API for many AI models)8 min

OpenRouter vs Direct API Keys: Which One Should You Use?

Go (Golang)5 min

Golang if err != nil Checks in 5 Minutes

Go (Golang)8 min

How to Fix Golang 'go.mod File Not Found' Errors

AI agents & MCP22 min

MCP Servers: Full Tutorial for Beginners

Go (Golang)5 min

Golang Error Return Values in 5 Minutes

Python8 min

How to Fix Python ModuleNotFoundError: No Module Named

Go (Golang)5 min

Golang Pointers in 5 Minutes

Kubernetes8 min

How to Fix a Kubernetes Pod Stuck in CrashLoopBackOff

Homelab & self-hosting9 min

How to Fix a Homelab ESXi Host Not Responding

PostgreSQL24 min

PostgreSQL: Full Tutorial for Beginners

Load balancing & Nginx9 min

How a Load Balancer Works with HAProxy

Python9 min

How Python Virtual Environments Work

Homelab & self-hosting9 min

How to Fix Cloudflare Tunnel Errors in a Homelab

APIs9 min

How to Fix API CORS Errors: No 'Access-Control-Allow-Origin'

Auth (OAuth, JWT)9 min

How Authenticator App Login Codes Work (TOTP)

Git22 min

Git and GitHub: Full Tutorial for Beginners

Homelab & self-hosting10 min

How a Homelab Hypervisor Works (VMware ESXi)

Kubernetes9 min

How to Fix Kubernetes ImagePullBackOff Errors

DNS8 min

How to Fix DNS 'Temporary Failure in Name Resolution' on Linux

AWS8 min

How to Fix AWS CLI 'Unable to Locate Credentials'

Homelab & self-hosting10 min

Proxmox vs ESXi for Your Homelab: When Each One Wins

PostgreSQL10 min

PostgreSQL UUID vs Auto Increment: Which Primary Key Should You Use?

Kubernetes21 min

Kubernetes: Full Tutorial for Beginners

Networking9 min

How TCP Sockets Work

PostgreSQL7 min

How to Fix PostgreSQL 'Could Not Connect to Server'

Claude & the Claude Developer Platform9 min

Claude Code Hooks Will Finally Make Sense After This

DevOps & CI/CD9 min

DevOps with Ansible Will Finally Make Sense After This

Networking9 min

How SNMP Network Monitoring Works

Git8 min

How to Fix GitHub 'Permission Denied (publickey)' Errors

Docker21 min

Docker: Full Tutorial for Beginners

PostgreSQL7 min

How to Fix PostgreSQL 'Password Authentication Failed'

Linux8 min

Why One Linux Server Handles More Users Than You Think

Networking7 min

How to Fix Network 'Connection Refused' Errors

DevOps & CI/CD9 min

DevOps Pipelines: Jenkins vs GitHub Actions

Linux11 min

Linux Nginx Reverse Proxy: Full Tutorial for Beginners

Networking11 min

Every Networking Term a Beginner Needs in 12 Minutes

Docker6 min

How to Fix Docker 'Permission Denied' on docker.sock

Git7 min

How to Fix Git 'Updates Were Rejected' When You Push

Linux7 min

How to Fix nginx 502 Bad Gateway Errors on Linux

Linux8 min

How to Fix Linux apt 'Could Not Get Lock' Errors (Ubuntu)

Networking9 min

How Email Works on the Internet (SMTP) in 10 Minutes

Python8 min

The Python Roadmap for Beginners

Go (Golang)21 min

Golang REST API with Gin: Full Tutorial for Beginners

Networking10 min

How a WireGuard VPN Network Works

Linux9 min

Linux Makefiles Will Finally Make Sense After This

Auth (OAuth, JWT)9 min

SAML vs OAuth vs OpenID Connect: What's the Difference?

Python7 min

How to Fix Python cron Jobs That Never Run

Linux22 min

Linux Bash Scripting: Full Tutorial for Beginners

Networking10 min

How PXE Network Boot Works

Active Directory9 min

How Active Directory Works

Linux10 min

How to Fix a Linux systemd Service That Won't Start

Linux9 min

Linux Logs: syslog vs journald

Auth (OAuth, JWT)9 min

JWT vs Session Cookies: Which One Should You Use?

Docker10 min

Docker vs Docker Compose: Which One Should You Use?

Docker9 min

How to Fix Docker Compose Containers That Can't Talk to Each Other

Django (Python web framework)22 min

Django Full Tutorial for Beginners

Linux9 min

How Linux systemd Works

Networking8 min

How to Fix 'Windows Cannot Access' Network Share Errors (SMB)

APIs10 min

REST vs gRPC: Which One Should You Use?

Certificates & PKI (ADCS)9 min

How to Fix SSL Certificate Chain Errors (Missing Intermediate)

Python9 min

Every Python Concept for Beginners in 10 Minutes

Databases & SQL9 min

Every SQL Join Type in 10 Minutes

OpenRouter (one API for many AI models)9 min

Why OpenRouter Free Models Hit Their Limit So Fast

Gemini API & Google AI Studio9 min

Why Your Gemini API Free Tier Runs Out So Fast

OpenRouter (one API for many AI models)10 min

OpenRouter Will Finally Make Sense After This

Caching & Redis10 min

How Redis Caching Works

Gemini API & Google AI Studio10 min

Gemini API vs Vertex AI: Which One Should You Use?

Gemini API & Google AI Studio8 min

How to Fix a Leaked Gemini API Key

Go (Golang)9 min

Why Golang Uses Goroutines Instead of Threads

Gemini API & Google AI Studio9 min

How to Fix Gemini API Error 429: Resource Exhausted

Claude & the Claude Developer Platform10 min

Claude Token Pricing Will Finally Make Sense After This

Python11 min

Why Python Web Scraping Returns Nothing (and the Fix)

Python10 min

Python uv vs pip: Which One Should You Use?

Python22 min

Python Automation: Full Tutorial for Beginners

Auth (OAuth, JWT)9 min

How OAuth Login Works

Gemini API & Google AI Studio10 min

Google AI Studio Will Finally Make Sense After This

Docker10 min

What Happens When You Run a Docker Container

Claude & the Claude Developer Platform8 min

How to Fix Claude Code Billing Your API Key Instead of Your Plan

Auth (OAuth, JWT)9 min

Why Passkeys Can't Be Phished Like Passwords

PowerShell10 min

PowerShell vs Bash: Which One Should You Learn?

Linux10 min

The Linux Roadmap for Beginners

Django (Python web framework)9 min

Django vs FastAPI: Which One Should You Use?

Databases & SQL10 min

Why SQLite Is the Most Used Database in the World

Databases & SQL11 min

How a NoSQL Database Like MongoDB Works

Python11 min

How to Fix Python pip error: externally-managed-environment

Databases & SQL9 min

How to Fix MySQL Too Many Connections Database Errors

Go (Golang)9 min

Golang Concurrency Will Finally Make Sense After This

AWS10 min

How Amazon S3 Works

Kubernetes10 min

How Kubernetes Works

Git10 min

How Git Works

Docker10 min

How to Fix Docker Port Already Allocated Errors

PostgreSQL10 min

How PostgreSQL Works

Git8 min

How to Fix Git Merge Conflicts

Linux9 min

How to Fix No Space Left on Device in Linux

Networking10 min

How the Internet Works

Databases & SQL9 min

SQL vs NoSQL: When Each One Wins

Auth (OAuth, JWT)8 min

How to Fix JWT Token Expired Errors (401 Unauthorized)

Claude & the Claude Developer Platform9 min

Claude API vs Claude Pro: Why Your Subscription Doesn't Include It

AI agent skills9 min

Why AI Agent Skills Beat Giant Prompts

Linux10 min

Linux Cron Jobs Will Finally Make Sense After This

Cybersecurity10 min

Security Logs Will Finally Make Sense After This

Cybersecurity8 min

How to Fix a Security Leak: An API Key Pushed to GitHub

DNS9 min

DNS Will Finally Make Sense After This

Cybersecurity9 min

Never Ignore a Security Update

Auth (OAuth, JWT)9 min

Two-Factor Authentication Will Finally Make Sense

Networking8 min

Never Expose a Database to the Internet

Cybersecurity10 min

SSH Keys vs Passwords: Which Is Safer for Security?

Linux10 min

The 5 Levels of Linux Boot: From Power On to Login

Networking12 min

The 5 Levels of Network Firewalls

Cybersecurity10 min

Password Security: Why Hackers Crack Weak Passwords

Linux9 min

Why Your Linux Server Runs Out of Memory

Networking10 min

HTTP vs HTTPS: What Actually Changes on Your Network

Linux12 min

Every Linux File Permission You Need to Know

Linux10 min

Linux Processes vs Threads: When Each One Wins

Networking11 min

The OSI Model Will Finally Make Sense After This

Git11 min

The 7 Levels of Git

Networking10 min

Every Network Troubleshooting Command You Need

Cybersecurity10 min

Hashing vs Encryption in Cybersecurity: When Each One Wins

Networking11 min

Why the Internet Ran Out of IP Addresses

Linux11 min

Linux Package Managers: apt vs Snap vs Flatpak

Python9 min

Why Python Is Slow (and When It Doesn't Matter)

Networking11 min

TCP vs UDP: When Each One Wins

Linux8 min

Stop Running Linux as Root (Do This Instead)

Linux11 min

Linux Users and Groups Will Finally Make Sense

Cybersecurity9 min

Why Phishing Beats Good Security (and How to Spot It)

Docker12 min

The 7 Levels of Docker

AI agents & MCP12 min

AI Agents Will Finally Make Sense After This

Git8 min

Stop Using git push --force (Use This Instead)

AI agent skills10 min

Agent Skills vs MCP: When Each One Wins

Networking12 min

Networking Will Finally Make Sense After This

Linux12 min

Every Linux Command You Actually Need

Cybersecurity12 min

The 7 Levels of Cybersecurity

System design12 min

Every System Design Concept You Need, in One Diagram

PostgreSQL10 min

Why PostgreSQL Ignores Your Index