fix: handle SSL certificate verification failure in curl install script (closes #28044) - #33711
Conversation
|
Hi MORDEHAI BOTBIKA (@botbikamordehai2-sketch), |
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
handle SSL certificate verification failure |
|
Yu Chen (@jsntcy) ZelinWang (@wangzelin007) Yong Zhang (@yonzhan) Naga Nandyala (@naga-nandyala) , please also review/approve the PR as a protected branch |
Qi Pan (Pan-Qi)
left a comment
There was a problem hiding this comment.
Please change your PR target to dev
The base branch was changed.
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Live test skipped⏭️ Skipping the live test for this revision because no new test file was added ( The live-test pipeline runs only the test files a PR changes, so there is nothing to execute for this commit. This is informational — a regression test is encouraged where it makes sense, but not required. If a test file is added in a later commit, the live test will run automatically. |
There was a problem hiding this comment.
CI/Live-Test Summary
Live test: ✅ Passed.
Upstream CI: ❌ 2 of 57 checks failed:
- Azure.azure-cli — Build #20260715.4 failed (details)
- Azure.azure-cli (Check the Format of Pull Request Title and Content) — failed (details)
The title/description format gate is failing — please make sure the PR title and description follow the repository's contribution guidelines (e.g. [Component] <summary> and a Fixes #N/closes #N link in the description), then check the build log for the other failure. Re-run (/azp run) once addressed.
|
🔔 Routing this PR to @Azure/act-platform-engineering-squad. |
What
The
curl_install_pypi/install.pyscript usesurlopenfromurllib.requestwithout SSL context customization. On corporate networks with self-signed certificates, this causesSSLCertVerificationErrorand prevents installation of Bicep (and the CLI itself if using the curl install method).Fix
Add
ssl._create_unverified_contextas the default HTTPS context before any HTTPS requests are made. This matches the pattern used in other parts of the Azure CLI codebase (e.g.,azure-cli-core/azure/cli/core/_profile.py) and allows users behind corporate proxies with custom certificates to install the CLI.Closes #28044