Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

SSL: CERTIFICATE_VERIFY_FAILED #367

Answered by tiangolo
drount asked this question in Questions
Discussion options

Hello,

after building an image yesterday based on:
FROM tiangolo/uwsgi-nginx-flask:python3.8 or
FROM tiangolo/uwsgi-nginx-flask:python3.7

I got this error when conecting to any HTTPS server:

ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)> (caused by URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)')))"

I had to add:
RUN apt-get update && apt-get install -y ca-certificates
to my Dockerfile in order to fix it.

Reporting just in case you want to add it to the root image or it helps anybody in the future.

You must be logged in to vote

Thanks for the report! 🤓 🍰

Replies: 9 comments

Comment options

Hey, @drount ! Thanks for giving the fix 💙 . I was facing the exact same problem and this helped a lot.

You must be logged in to vote
0 replies
Comment options

Looking at the dates, it seems docker hub should be updated with that fix, but I still have server certificate verification failed. when pulling git requirements for example.

You must be logged in to vote
0 replies
Comment options

I don't see the changes in the source code

You must be logged in to vote
0 replies
Comment options

Had to add this to my own docker file and this seemed to fix it for me:

RUN apt-get update
RUN apt-get install -y --reinstall ca-certificates
You must be logged in to vote
0 replies
Comment options

i believe this is still an issue. above suggestions didnt work for me

You must be logged in to vote
0 replies
Comment options

Thank you very much. This helped me a lot.

You must be logged in to vote
0 replies
Comment options

How can I fix this on windows?

You must be logged in to vote
0 replies
Comment options

This is still an issue for me too. Had to run ca-certificates as described to fix

You must be logged in to vote
0 replies
Comment options

Thanks for the report! 🤓 🍰

You must be logged in to vote
0 replies
Answer selected by tiangolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants
Converted from issue

This discussion was converted from issue #181 on August 29, 2024 00:16.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.