az cli doesn't use documented repo #5822
-
Says that it is installed from 'https://packages.microsoft.com/repos/azure-cli/' The stackoverflow post on downgrading your azure cli version no longer works because of that: It can't find the version:
Checking the available versions only reports 2.0.25-1
I was able to make it work by adding this to my pipeline: AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" |
sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-get update
sudo apt-cache madison azure-cli
sudo apt-get install -y --allow-downgrades azure-cli=2.36.0-1~bionic I've had to do this because of breaking changes that do not have a replacement, (there is an issue raised already). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We install Also we provide the installation method in https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-Readme.md#cli-tools doc file which repo we use: |
Beta Was this translation helpful? Give feedback.
We install
azure-cli
from therepos/azure-cli
repo and delete it after the installation, that's why you should manually to add it at runtime - https://github.com/actions/virtual-environments/blob/main/images/linux/scripts/installers/azure-cli.shAlso we provide the installation method in https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-Readme.md#cli-tools doc file which repo we use: