Maybe I am not following the docs clearly enough or maybe this is a Conda permission issue but upon running conda env update -f environment.yml
in my bristlemouth conda environment (I’m following the ENV_SETUP.md document in the bm_protocol github) I get this error message:
(bristlemouth) > $ conda env update -f environment.yml [±develop ✓]
Collecting package metadata (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: /sofar_fw/osx-64/repodata.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))
I would expect that I do not have a certificate to access this repodata.json file, but why is it required for an open source repository?
Hey @jradema ! Welcome! Sorry to hear you’re having trouble getting started.
This looks really similar to an issue someone posted in conda itself:
opened 09:02PM - 12 Apr 23 UTC
closed 07:35AM - 14 Apr 23 UTC
type::bug
source::community
pending::support
### What happened?
Hi, when I try to update conda I ran into following error.… It also happens when I try to install new environment with --override-channels
```
(base) [salee@login02 lib]$ conda update conda
Collecting package metadata (current_repodata.json): failed
CondaSSLError: Encountered an SSL error. Most likely a certificate verification issue.
Exception: HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/linux-64/current_repodata.json (Caused by SSLError(CertificateError("hostname 'repo.anaconda.com' doesn't match either of '*.scripps.edu', 'scripps.edu', 'www.scripps.edu', 'itservices.lj.ad.scripps.edu'")))
```
### Conda Details
<details>
<summary><code>conda info</code></summary>
```shell
active environment : base
active env location : /gpfs/home/salee/mambaforge
shell level : 1
user config file : /gpfs/home/salee/.condarc
populated config files : /gpfs/home/salee/mambaforge/.condarc
/gpfs/home/salee/.condarc
conda version : 23.3.1
conda-build version : not installed
python version : 3.10.10.final.0
virtual packages : __archspec=1=x86_64
__glibc=2.17=0
__linux=3.10.0=0
__unix=0=0
base environment : /gpfs/home/salee/mambaforge (writable)
conda av data dir : /gpfs/home/salee/mambaforge/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /gpfs/home/salee/mambaforge/pkgs
/gpfs/home/salee/.conda/pkgs
envs directories : /gpfs/home/salee/mambaforge/envs
/gpfs/home/salee/.conda/envs
platform : linux-64
user-agent : conda/23.3.1 requests/2.28.2 CPython/3.10.10 Linux/3.10.0-1160.76.1.el7.x86_64 centos/7.9.2009 glibc/2.17
UID:GID : 143365:10476
netrc file : None
offline mode : False
```
</details>
<details>
<summary><code>conda config</code></summary>
```shell
==> /gpfs/home/salee/mambaforge/.condarc <==
channels: []
==> /gpfs/home/salee/.condarc <==
auto_activate_base: True
channel_priority: flexible
channels: []
```
</details>
<details>
<summary><code>conda list</code></summary>
```shell
# packages in environment at /gpfs/home/salee/mambaforge:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
aioeasywebdav 2.4.0 pyha770c72_0 conda-forge
aiohttp 3.8.4 py310h1fa729e_0 conda-forge
aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge
amply 0.1.5 pyhd8ed1ab_0 conda-forge
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.2 pyhd8ed1ab_0 conda-forge
attmap 0.13.2 pyhd8ed1ab_0 conda-forge
attrs 22.2.0 pyh71513ae_0 conda-forge
backports 1.0 pyhd8ed1ab_3 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
bcrypt 3.2.2 py310h5764c6d_1 conda-forge
boltons 23.0.0 pyhd8ed1ab_0 conda-forge
boto3 1.26.111 pyhd8ed1ab_0 conda-forge
botocore 1.29.111 pyhd8ed1ab_0 conda-forge
brotlipy 0.7.0 py310h5764c6d_1005 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.18.1 h7f98852_0 conda-forge
ca-certificates 2022.12.7 ha878542_0 conda-forge
cachetools 5.3.0 pyhd8ed1ab_0 conda-forge
certifi 2022.12.7 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py310h255011f_3 conda-forge
charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge
coin-or-cbc 2.10.8 h3786ebc_0 conda-forge
coin-or-cgl 0.60.6 h6f57e76_2 conda-forge
coin-or-clp 1.17.7 hc56784d_2 conda-forge
coin-or-osi 0.108.7 h2720bb7_2 conda-forge
coin-or-utils 2.11.6 h202d8b1_2 conda-forge
coincbc 2.10.8 0_metapackage conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
conda 23.3.1 py310hff52083_0 conda-forge
conda-package-handling 2.0.2 pyh38be061_0 conda-forge
conda-package-streaming 0.7.0 pyhd8ed1ab_1 conda-forge
configargparse 1.5.3 pyhd8ed1ab_0 conda-forge
connection_pool 0.0.3 pyhd3deb0d_0 conda-forge
cryptography 40.0.1 py310h34c0648_0 conda-forge
datrie 0.8.2 py310h5764c6d_6 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
docutils 0.19 py310hff52083_1 conda-forge
dpath 2.1.5 py310hff52083_0 conda-forge
dropbox 11.36.0 pyhd8ed1ab_0 conda-forge
exceptiongroup 1.1.1 pyhd8ed1ab_0 conda-forge
filechunkio 1.8 py_2 conda-forge
filelock 3.11.0 pyhd8ed1ab_0 conda-forge
fmt 9.1.0 h924138e_0 conda-forge
frozenlist 1.3.3 py310h5764c6d_0 conda-forge
ftputil 5.0.4 pyhd8ed1ab_0 conda-forge
gitdb 4.0.10 pyhd8ed1ab_0 conda-forge
gitpython 3.1.31 pyhd8ed1ab_0 conda-forge
google-api-core 2.11.0 pyhd8ed1ab_0 conda-forge
google-api-python-client 2.85.0 pyhd8ed1ab_0 conda-forge
google-auth 2.17.2 pyh1a96a4e_0 conda-forge
google-auth-httplib2 0.1.0 pyhd8ed1ab_1 conda-forge
google-cloud-core 2.3.2 pyhd8ed1ab_0 conda-forge
google-cloud-storage 2.8.0 pyh1a96a4e_0 conda-forge
google-crc32c 1.1.2 py310he8fe98e_4 conda-forge
google-resumable-media 2.4.1 pyhd8ed1ab_0 conda-forge
googleapis-common-protos 1.57.1 pyhd8ed1ab_0 conda-forge
grpcio 1.52.1 py310heca2aa9_1 conda-forge
httplib2 0.22.0 pyhd8ed1ab_0 conda-forge
humanfriendly 10.0 py310hff52083_4 conda-forge
icu 72.1 hcb278e6_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
importlib-metadata 6.3.0 pyha770c72_0 conda-forge
importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge
iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
jmespath 1.0.1 pyhd8ed1ab_0 conda-forge
jsonpatch 1.32 pyhd8ed1ab_0 conda-forge
jsonpointer 2.0 py_0 conda-forge
jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge
jupyter_core 5.3.0 py310hff52083_0 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.20.1 h81ceb04_0 conda-forge
ld_impl_linux-64 2.40 h41732ed_0 conda-forge
libabseil 20230125.0 cxx17_hcb278e6_1 conda-forge
libarchive 3.6.2 h3d51595_0 conda-forge
libblas 3.9.0 16_linux64_openblas conda-forge
libcblas 3.9.0 16_linux64_openblas conda-forge
libcrc32c 1.1.2 h9c3ff4c_0 conda-forge
libcurl 7.88.1 hdc1c0ab_1 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 12.2.0 h65d4601_19 conda-forge
libgfortran-ng 12.2.0 h69a702a_19 conda-forge
libgfortran5 12.2.0 h337968e_19 conda-forge
libgomp 12.2.0 h65d4601_19 conda-forge
libgrpc 1.52.1 hcf146ea_1 conda-forge
libiconv 1.17 h166bdaf_0 conda-forge
liblapack 3.9.0 16_linux64_openblas conda-forge
liblapacke 3.9.0 16_linux64_openblas conda-forge
libmamba 1.4.1 hcea66bb_0 conda-forge
libmambapy 1.4.1 py310h1428755_0 conda-forge
libnghttp2 1.52.0 h61bc06f_0 conda-forge
libnsl 2.0.0 h7f98852_0 conda-forge
libopenblas 0.3.21 pthreads_h78a6416_3 conda-forge
libprotobuf 3.21.12 h3eb15da_0 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libsolv 0.7.23 h3eb15da_0 conda-forge
libsqlite 3.40.0 h753d276_0 conda-forge
libssh2 1.10.0 hf14f497_3 conda-forge
libstdcxx-ng 12.2.0 h46fd767_19 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libxml2 2.10.3 hfdac1af_6 conda-forge
libzlib 1.2.13 h166bdaf_4 conda-forge
logmuse 0.2.6 pyh8c360ce_0 conda-forge
lz4-c 1.9.4 hcb278e6_0 conda-forge
lzo 2.10 h516909a_1000 conda-forge
mamba 1.4.1 py310h51d5547_0 conda-forge
markdown-it-py 2.2.0 pyhd8ed1ab_0 conda-forge
markupsafe 2.1.2 py310h1fa729e_0 conda-forge
mdurl 0.1.0 pyhd8ed1ab_0 conda-forge
multidict 6.0.4 py310h1fa729e_0 conda-forge
nbformat 5.8.0 pyhd8ed1ab_0 conda-forge
ncurses 6.3 h27087fc_1 conda-forge
numpy 1.24.2 py310h8deb116_0 conda-forge
oauth2client 4.1.3 py_0 conda-forge
openssl 3.1.0 h0b41bf4_0 conda-forge
packaging 23.0 pyhd8ed1ab_0 conda-forge
pandas 2.0.0 py310h9b08913_0 conda-forge
paramiko 3.1.0 pyhd8ed1ab_0 conda-forge
peppy 0.35.5 pyhd8ed1ab_0 conda-forge
pip 23.0.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge
plac 1.3.5 pyhd8ed1ab_0 conda-forge
platformdirs 3.2.0 pyhd8ed1ab_0 conda-forge
pluggy 1.0.0 pyhd8ed1ab_5 conda-forge
ply 3.11 py_1 conda-forge
prettytable 3.7.0 pyhd8ed1ab_0 conda-forge
protobuf 4.21.12 py310heca2aa9_0 conda-forge
psutil 5.9.4 py310h5764c6d_0 conda-forge
pulp 2.7.0 py310hff52083_0 conda-forge
pyasn1 0.4.8 py_0 conda-forge
pyasn1-modules 0.2.7 py_0 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycosat 0.6.4 py310h5764c6d_1 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pygments 2.15.0 pyhd8ed1ab_0 conda-forge
pynacl 1.5.0 py310h5764c6d_2 conda-forge
pyopenssl 23.1.1 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pyrsistent 0.19.3 py310h1fa729e_0 conda-forge
pysftp 0.2.9 py_1 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
pytest 7.3.0 pyhd8ed1ab_0 conda-forge
python 3.10.10 he550d4f_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.16.3 pyhd8ed1ab_0 conda-forge
python-irodsclient 1.1.6 pyhd8ed1ab_0 conda-forge
python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge
python_abi 3.10 3_cp310 conda-forge
pytz 2023.3 pyhd8ed1ab_0 conda-forge
pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge
pyyaml 6.0 py310h5764c6d_5 conda-forge
re2 2023.02.02 hcb278e6_0 conda-forge
readline 8.2 h8228510_1 conda-forge
reproc 14.2.4 h0b41bf4_0 conda-forge
reproc-cpp 14.2.4 hcb278e6_0 conda-forge
requests 2.28.2 pyhd8ed1ab_1 conda-forge
reretry 0.11.8 pyhd8ed1ab_0 conda-forge
rich 13.3.3 pyhd8ed1ab_0 conda-forge
rsa 4.9 pyhd8ed1ab_0 conda-forge
ruamel.yaml 0.17.21 py310h1fa729e_3 conda-forge
ruamel.yaml.clib 0.2.7 py310h1fa729e_1 conda-forge
s3transfer 0.6.0 pyhd8ed1ab_0 conda-forge
setuptools 65.6.3 pyhd8ed1ab_0 conda-forge
setuptools-scm 7.1.0 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
slacker 0.14.0 py_0 conda-forge
smart_open 6.3.0 pyhd8ed1ab_1 conda-forge
smmap 3.0.5 pyh44b312d_0 conda-forge
snakemake 7.25.0 hdfd78af_0 bioconda
snakemake-minimal 7.25.0 pyhdfd78af_0 bioconda
stone 3.3.1 pyhd8ed1ab_0 conda-forge
stopit 1.1.2 py_0 conda-forge
tabulate 0.9.0 pyhd8ed1ab_1 conda-forge
throttler 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
toposort 1.10 pyhd8ed1ab_0 conda-forge
tqdm 4.65.0 pyhd8ed1ab_1 conda-forge
traitlets 5.9.0 pyhd8ed1ab_0 conda-forge
typing-extensions 4.5.0 hd8ed1ab_0 conda-forge
typing_extensions 4.5.0 pyha770c72_0 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
ubiquerg 0.6.2 pyhd8ed1ab_0 conda-forge
uritemplate 4.1.1 pyhd8ed1ab_0 conda-forge
urllib3 1.26.15 pyhd8ed1ab_0 conda-forge
veracitools 0.1.3 py_0 conda-forge
wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge
wheel 0.40.0 pyhd8ed1ab_0 conda-forge
wrapt 1.15.0 py310h1fa729e_0 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
yaml-cpp 0.7.0 h27087fc_2 conda-forge
yarl 1.8.2 py310h5764c6d_0 conda-forge
yte 1.5.1 py310hff52083_1 conda-forge
zipp 3.15.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 h166bdaf_4 conda-forge
zstandard 0.19.0 py310hdeb6495_1 conda-forge
zstd 1.5.2 h3eb15da_6 conda-forge
```
</details>
Try running this quick test in your terminal and reply here with the output:
curl -v https://conda.anaconda.org/sofar_fw/osx-64/repodata.json
It’s a public file with a valid certificate, but if you’re on a managed network, your local admins might be blocking things. Let us know whether curl can see the json file.
Hi zach, thanks for the help. I tried curl and it is able to successfully connect (I can also view the file in my browser). I’m not sure why conda-env update is raising an SSL error. Here is the curl output:
* Trying 104.17.92.24:443...
* Connected to conda.anaconda.org (104.17.92.24) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=anaconda.org
* start date: Aug 4 00:57:35 2023 GMT
* expire date: Aug 18 00:57:35 2023 GMT
* subjectAltName: host "conda.anaconda.org" matched cert's "*.anaconda.org"
* issuer: C=US; ST=California; O=Zscaler Inc.; OU=Zscaler Inc.; CN=Zscaler Intermediate Root CA (zscalergov.net) (t)
* SSL certificate verify ok.
* using HTTP/1.x
> GET /sofar_fw/osx-64/repodata.json HTTP/1.1
> Host: conda.anaconda.org
> User-Agent: curl/8.1.2
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 04 Aug 2023 17:47:45 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< CF-Ray: 7f18a09b0ac12022-IAD
< CF-Cache-Status: DYNAMIC
< Cache-Control: must-revalidate
< Last-Modified: Wed, 07 Jun 2023 20:20:53 GMT
< Strict-Transport-Security: max-age=31536000
< Conda-File-Cache: hit
< Set-Cookie: __cf_bm=nN4muJMCaj_vxxL8vn098dXKBi4suohAEXksVZUVta4-1691171265-0-AY52EIJpkTNMsRuWimZTPgOMyyuY97zRGA1FsNoUrK9/0gSAFYIx7VFBfnr3UCigRVjPfRTDIK8BZ/r/ck1DzPG/iiQIQgfetMMHubk2zdds; path=/; expires=Fri, 04-Aug-23 18:17:45 GMT; domain=.anaconda.org; HttpOnly; Secure; SameSite=None
< Server: cloudflare
<
* Connection #0 to host conda.anaconda.org left intac
Do you see the json after the “Connection #0 to host conda.anaconda.org left intact”?
The differences I see from my own curl invocation are:
I see ALPN: server accepted h2
but you see ALPN: server did not agree on a protocol. Uses default.
which then goes with HTTP 1.1 instead of HTTP 2. Shouldn’t matter, but it’s a signal something’s different.
I see the certificate issuer as Cloudflare, but you see Zscaler (a cybersecurity company). That’s another sign of some system in the middle that could be blocking conda.
If it’s an option for you, my best advice is to run the conda env update from another network, either by moving your computer (if it’s a laptop) to home or elsewhere, or else through a VPN or other proxy.
If those aren’t options, you may have to talk to local IT folks.
Sorry, i forgot to attach the JSON but yes I do receive that after that line. And yes I do logon to my company’s network through zscaler so that might have something to do with it. I can reach out to them for some help.
zack_j
August 5, 2023, 2:35am
6
Hi there, y’all! Just doing a little custodian duty and moved this over to Dev Kit Support ! I hope you don’t mind.
Thx Z