Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect original ssl_verify values #860

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions constructor/fcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,16 +451,18 @@ def main(info, verbose=True, dry_run=False, conda_exe="conda.exe"):
# We need to preserve the configuration for proxy servers and ssl, otherwise if constructor is
# running in a host that sits behind proxy (usually in a company / corporate environment) it
# will have this settings reset with the call to conda_replace_context_default
# We can pass ssl_verify via env var, but proxy_servers is a mapping so we need to do it by hand
# See: https://github.com/conda/constructor/issues/304
proxy_servers = conda_context.proxy_servers
ssl_verify = conda_context.ssl_verify

_ssl_verify = conda_context.ssl_verify
with env_vars({
"CONDA_PKGS_DIRS": download_dir,
"CONDA_SSL_VERIFY": str(conda_context.ssl_verify),
}, conda_replace_context_default):
# Restoring the state for both "proxy_servers" and "ssl_verify" to what was before
# Restoring the state for "proxy_servers" to what it was before
conda_context.proxy_servers = proxy_servers
conda_context.ssl_verify = ssl_verify
assert conda_context.ssl_verify == _ssl_verify
assert conda_context.pkgs_dirs and conda_context.pkgs_dirs[0] == download_dir

(
pkg_records,
Expand Down
19 changes: 19 additions & 0 deletions news/860-ssl-verify
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* Respect `ssl_verify` setting if defined in any `condarc` file. (#851 via #860)

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
Loading