Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conda SSL error

I’m having some issues getting conda to respect my proxy declaration. I’ve copied the proxy strings from the examples in the conda docs and replaced the urls with my own. I’ve also exported the HTTP_PROXY and HTTPS_PROXY with strings that I know work. My ~/.condarc file looks like:

proxy_servers:
    http: http://<proxyaddress>:<port>
    https: https://<proxyaddress>:<port>

Any suggestions?

EDIT: conda version: 3.14.1

looks like the proxy string is actually fine. The real issue that didn't come up at first is that conda isn't using the ca-cert that I need for due to our corporate proxy. The specific error, which appears when I attempt to install a package, is:

Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581): ...
like image 439
LISTERINE Avatar asked Jul 30 '15 16:07

LISTERINE


1 Answers

I figured it out so I thought I'd come back and report.

I'm not sure how to make conda use a specific cert, but conda uses requests for it's web requests. You can inject a cert bundle into requests' path by setting the environment variable REQUESTS_CA_BUNDLE.

so I ran:

export REQUESTS_CA_BUNDLE=/usr/local/share/ca-certificates/<my-cert-name>

and now conda can get through our proxy!

like image 98
LISTERINE Avatar answered Oct 06 '22 01:10

LISTERINE