Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sergey Istomin
committed
Apr 3, 2024
1 parent
76a39d3
commit fbb8514
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Poetry Issues with Certificates | ||
![Bug search](./full_experience_in_commercial_software_dev.md) | ||
|
||
Today was not a good day. I tried to set up a new project in which I'll be committing for the next two weeks and finally got stuck with an error like this: | ||
``` | ||
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997) | ||
``` | ||
My current Python environment configuration looks like this: | ||
``` | ||
System Python -> PyEnv -> python venv (pip) -> Poetry | ||
``` | ||
Poetry seems to be the culprit in this case, as I verified that `pip` is working properly. I even attempted to trace calls from inside a running instance using: | ||
```bash | ||
strace -e trace=open,openat,execve -f poetry install 2>&1 | tee strace_output.txt | grep "\.pem" | ||
``` | ||
After an hour of googling and investigating, I found a solution: | ||
```bash | ||
sudo cp ~/Downloads/all.pem /etc/ca-certificates/trust-source/anchors/certificates.pem | ||
sudo trust extract-compat | ||
export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt | ||
poetry install | ||
``` |