This is the unofficial installation guide, please refer to the official guide at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
- download cygwin installation manager at https://cygwin.com/install.html
- prepare base cygwin environment with curl and wget packages:
setup-x86_64.exe -q -g -B -D -L -d -o -N -s http://cygwin.mirror.constant.com/ -l C:/cygwin/distro -R C:/cygwin -C Base -P curl,wget
(FAQ CLI), omit last two parameters-C Base -P curl,wget
to quietly update all cygwin packages, and optionally add-M
to reveal package manager - exec installed cygwin shell
- clean PATH environment variable:
export PATH="/usr/local/bin:/usr/bin"
(alternatively you may create a shortcutC:\cygwin\bin\mintty.exe -t "Cygwin Shell" -i "/Cygwin-Terminal.ico" /bin/env "CYGWIN_NOWINPATH=1" /bin/bash -l
) - install apt-cyg:
curl -sSL https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg -o /bin/apt-cyg
- make apt-cyg executable:
chmod +x /bin/apt-cyg
- refresh apt-cyg cache:
apt-cyg update
- install required packages:
apt-cyg install python3 python3-devel gcc-g++ gcc-core libffi-devel openssl-devel make libsodium-devel libssl-devel
- create link to python3:
ln -s /usr/bin/python3 /usr/bin/python
- install pip:
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
- run install:
SODIUM_INSTALL=system pip install azure-cli
(may take some time to compile, if failed try to set specific version likeazure-cli==2.0.61
) - run external browser:
export BROWSER="cygstart"
- login:
az login
- confirm login in a web-browser
- check with:
az account show
andaz account list --o table
register cygwin in Windows context menu
apt-cyg install chere
chere -i -t mintty -e "Open Cygwin Here" -s bash -c -f -o '-t \"Cygwin Shell\" -i \"/Cygwin-Terminal.ico\"'
I haven't tested this workaround, I am not using cygwin too much these days, but this is what you all can try
Version 3.4 is the latest release which doesn't require rust to be installed, it is rather a soft dependency there, but starting from version 3.5 it became a hard dependency, and rust must be installed anyway. However, I am not sure how good the latest version of azure-cli is backward-compatible with the older cryptography package, hence the azure-cli downgrade may be needed.