urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
Resolved 💬 2 comments Opened Aug 8, 2025 by pakrym-oai Closed Aug 16, 2025
💡 Likely answer: A maintainer (bolinfest, collaborator)
responded on this thread — see the highlighted reply below.
We are working on fully resolving this issue in the meantime you can try one of the workarounds:
On MacOS
_(by @alpha-adam)_
Run this in Terminal:
open /Applications/Python\ 3.11/Install\ Certificates.command
This installs the required root certificates that Python uses for SSL.
After that, codex login should work without SSL errors.
*nix
_(by @thelonglincoln)_
export SSL_CERT_FILE=$(python3 -m certifi)
export REQUESTS_CA_BUNDLE=$(python3 -m certifi)
before running codex login
2 Comments
I just published version 0.20.0 on npm (https://www.npmjs.com/package/@openai/codex) which includes https://github.com/openai/codex/pull/2042
If you have been running into issues related to the Python stuff, please update to 0.22.0 as we migrated the Python code to Rust in the new release: https://github.com/openai/codex/releases/tag/rust-v0.22.0
As an added bonus, 0.22.0 now supports Markdown and streaming!