I have the following condarc
file to enable Conda installs through our web proxy and to hopefully resolve SSL errors. However, I am still getting SSL errors.
c:/Users/User.Name/.condarc
---------------------------
channels:
- defaults
# From /a/68724703/2153235
proxy_servers:
http: webproxy.My.Organization.ca:8080
https: webproxy.My.Organization.ca:8080
ssl_verify: C:UsersUser.NameCertificatesMWGProxyRootCA.crt
# Result of
# https://aafaqueabdullah.wordpress.com/2017/04/10/ssl-authentication:
# conda config --set ssl_verify True
# conda config --set ssl_verify C:UsersUser.NameCertificatesMWGProxyRootCA.crt
The web proxy URL is from the Windows proxy settings. The ssl_verify
file is created as follows:
- Use Chrome to visit an Anaconda package page, e.g.,
https://anaconda.org/conda-forge/ascii_graph - Click on the lock icon to the left of the URL
- In the resulting menu, click on “Connection is secure”
- In the resulting panel, click on “Certificate is valid”
- In the resulting panel, select the Details tab
- In the “Certificate Hierarchy” section, choose MWGProxyRootCA
- Click the Export button on the bottom right, then provide a
target path when prompted
Here is the SSL error:
(base) C:>conda activate TestEnv (TestEnv)
C:>conda install -c conda-forge ascii_graph
Collecting package metadata
(current_repodata.json): failed
CondaSSLError: Encountered an SSL error. Most
likely a certificate verification issue.
Exception:
HTTPSConnectionPool(host='conda.anaconda.org',
port=443): Max retries exceeded with url:
/conda-forge/win-64/current_repodata.json
(Caused by
SSLError(SSLCertVerificationError(1, '[SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify
failed: unable to get local issuer certificate
(_ssl.c:1006)')))
In the condarc
file, if I prefix the web proxy URLs with http://
and https://
, I get a different error:
(base) C:>conda activate TestEnv
(TestEnv) C:>conda install -c conda-forge ascii_graph
Collecting package metadata (current_repodata.json): failed
ProxyError: Conda cannot proceed due to an
error in your proxy configuration. Check for
typos and other configuration errors in any
'.netrc' file in your home directory, any
environment variables ending in '_PROXY', and
any other system-wide proxy configuration
settings.
None of these errors seem to be affected by whether I append a trailing /
to the web proxy URLs.
I followed a colleague’s advice and issued conda update conda
from the base environment of a newly launched Conda prompt, and from a different network than the one requiring proxy. All went well, but the above problems persist.
I would like to avoid the solutions requiring a user name and password, and solutions requiring environment variables. I would rather embed any solutions in condarc
and forget about it.
I am not a networking person. What should my next step be? If I need to talk to a networking person, what should I ask?