Python Requests throwing SSLError

前端 未结 24 2690
小蘑菇
小蘑菇 2020-11-22 02:49

I\'m working on a simple script that involves CAS, jspring security check, redirection, etc. I would like to use Kenneth Reitz\'s python requests because it\'s a great piec

24条回答
  •  -上瘾入骨i
    2020-11-22 03:28

    I ran into the same issue. Turns out I hadn't installed the intermediate certificate on my server (just append it to the bottom of your certificate as seen below).

    https://www.digicert.com/ssl-support/pem-ssl-creation.htm

    Make sure you have the ca-certificates package installed:

    sudo apt-get install ca-certificates
    

    Updating the time may also resolve this:

    sudo apt-get install ntpdate
    sudo ntpdate -u ntp.ubuntu.com
    

    If you're using a self-signed certificate, you'll probably have to add it to your system manually.

提交回复
热议问题