SOLVED: Using the Azure Command-Line Interface (CLI) behind Fiddler - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
If you want to use Fiddler to monitor the commands and REST calls that are executed by the Microsoft Azure Command-Line Interface (CLI) you may find you hit this error.
Using the Azure Command-Line Interface (CLI) behind Fiddler - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
The Azure Command-Line Interface (CLI) does use the built in system certificates in the machine store that you probably updated when you installed Fiddler and instead you need to up a configuration file.
- In the certificates MMC find the DO_NOT_TRUST_FidderRoot certificate, right click, and select All Tasks > Export.
- Select to not export the private key.
- If you don't have the certficate in here you can goto Fiddler goto Tools > Options > HTTPS > Actions > Export Root Certificate to Desktop.
- You can then import the certificate, then export it in BASE-64 encoding.
- Open the file certificate roots used by the CLI in notepad.exe - by default this is in this location.
C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem - Paste the exported certificate text to the end of the cacert.pem file and save the file.
- Executing the Azure Command-Line Interface (CLI) commands should now work as expected.
Comments
Post a Comment