certificate verify failed: unable to get local issuer certificate
- Ubuntu 20.04
#9403
Replies: 3 comments 2 replies
-
For me, I only get this when running on Mac OS. I have no clue how to fix but just wanted to say 😆 I don't have this issue on windows |
Beta Was this translation helpful? Give feedback.
-
Firstly, Linux works differently (regarding installation of certs) then MacOS or Windows. So that easy option doesn't exist. Common problems with certificates you seem to have tried. I recommend forcing an install and update ( |
Beta Was this translation helpful? Give feedback.
-
Small context update: Python's import requests
requests.get("https://discord.com", verify=True) This works, and returns 200. Seems import asyncio
import aiohttp
async def main():
async with aiohttp.ClientSession() as session:
async with session.get('https://discord.com') as response:
print('Status: ', response.status)
loop = asyncio.get_event_loop()
loop.run_until_complete(main()) This here is enough to get an ssl error. I have made an issue on aiohttp's repository. Hopefully they may know more about what to do to fix this issue. |
Beta Was this translation helpful? Give feedback.
-
Hello!
I've been pulling my hair out at this for the last two or so days, and I am completely at a loss as to what to do.
I'm running Ubuntu 20.04 with Python versions 3.8.10 and 3.9.5 tested. I have the
certifi
library installed which points to the defaultca-certificates
store location (/etc/ssl/certs/ca-certificates.crt
).I have tried adding certificates both "automatically" by downloading them via crt.sh and adding them to the store via
update-ca-certificates
(though I notice they are already there on a refresh viasudo update-ca-certificates --fresh
), and forcing them via manual edits into the cert store. So far, nothing I am doing seems to work.I have even followed some "non-safe" advice just to test via browsing to
discord.com
and just downloading the certs from there. No dice here either.I develop mainly on my windows machine, but this needs to be deployed to my Ubuntu server (due to other applications it needs to mesh with), and it works perfectly fine on my Windows machine.
I am at a complete loss as to what I need to do here. Every discussion and issue I have found about this is usually about Windows or Mac, and the resolution is just "Double click the certificate" or "Run Install Certificates.cmd" -- which are of course not very helpful here. Unless perhaps that Install Certificates file exists on Linux as well? I haven't been able to find it if that is the case.
Please help me, I am pulling my hair out at this and don't know where to go next. Any and all information will be useful as I continue to attempt to debug this.
Full python traceback
Some sample code as a sort of "minimum reproduce-able code"
Beta Was this translation helpful? Give feedback.
All reactions