[英]How to configure azure-cli behind a corporate proxy on Windows
我在公司代理后面使用 Windows 10 並且az --version
輸出以下內容:
azure-cli 2.5.1
command-modules-nspkg 2.0.3
core 2.5.1
nspkg 3.0.4
telemetry 1.0.4
...
Unable to check if your CLI is up-to-date. Check your internet connection.
此外, az extension list-available
拋出:
Unable to get extension index.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='aka.ms', port=443): Max retries exceeded with url: /azure-cli-extension-index-v1 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))
如何為企業代理配置 azure-cli?
對於 Windows 10,您可以在“ Settings > Network & Internet > Proxy
窗格中檢查代理設置。 請聯系您的系統管理員以獲取所需的設置,或者您的機器可能受配置管理或需要高級設置的情況。
wpad.dat
文件的開頭有一行類似於CWSProxy="PROXY proxy.corporation.com:8082";
export HTTPS_PROXY="proxy.corporation.com:8082"
現在az extension list-available
連接。 但是,由於某種原因, az --version
仍然Unable to check if your CLI is up-to-date. Check your internet connection.
Unable to check if your CLI is up-to-date. Check your internet connection.
您現在無論如何都可以安裝擴展,例如az extension add --name azure-devops
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.