Azure / Azure/azure-cli

Use the system certificate store instead of certifi

Open
#19,305 9 comments 6 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad customer-reported Feature Candidate feature-request Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

I'm trying to run "az upgrade", which fails beautifully presumably due to the corporate proxy we have. https://github.com/Azure/azure-cli/issues/17938#issuecomment-890038445 gives some information on how to solve it, including a link to https://docs.microsoft.com/en-us/cli/azure/use-cli-effectively#work-behind-a-proxy.

The outlined mechanism seems ... convoluted. It suggests that I should edit `C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem`. This requires that I acquire the corporate MITM certificate (it's probably easy, but I don't know how), and that I'm comfortable with the file format. Also, every user would have to do this on every computer.

* Would it be possible to bypass all of this, using the system certificate store instead?

```
> az upgrade
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
You already have the latest azure-cli version: 2.27.1
Upgrading extensions
Checking update for azure-devops
An error occurred whilst updating.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /Azure/azure-devops-cli-extension/releases/download/20210805.1/azure_devops-0.20.0-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1125)')))
Failed to update. Rolled azure-devops back to 0.18.0.
Checking update for resource-graph
No updates available for 'resource-graph'. Use --debug for more information.
Upgrade finished.
```

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.27.1

Extensions:
azure-devops 0.18.0
resource-graph 2.1.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.