SSL throwing error 185090050 while authentication via Oauth

狂风中的少年 提交于 2019-11-29 06:52:16
user2840182

I was getting this exact x509 error in oauth2 (for Twitter API, not Google) with Python 2.7.5 and used Akshay Valsa's advice and changed the permissions on cacerts.txt with

chmod 644 /usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/httplib2/cacerts.txt

That fixed the problem and I can now run my module as an ordinary user instead of sudoing it. Thanks!

This issue is while loading the certificates files.If you run the program with root user this issue will be solved. Or you can check the permissions of the file :/usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/httplib2/cacerts.txt, and provide the necessary permission to this file.

In my case I was running the Django development server. If the server was run prior to switching into the virtual environment I found [Errno 185090050] _ssl.c:345: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib in my traceback. Simply put, I was no longer running the version of httplib2 that created the certificates: I was likely running the dist-package. (Ububtu 13.10), Python 2.7, Django 1.62. Hope this helps others.

I figured out the solution. The Google OAuth is crazy to understand and I had to run the script as sudo/root for the first time. That worked. Also make sure the privileges are set correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!