Azure-cli: Unable to install az on Ubuntu 18.04 w apt

Created on 17 May 2018  路  5Comments  路  Source: Azure/azure-cli

Describe the bug
Unable to install a Microsoft signing key for az which works on Ubuntu 18.04 bionic and consequentially unable to install az via apt.

To Reproduce
Follow instructions in the document: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest

sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
Executing: /tmp/apt-key-gpghome.8anL89cvRR/gpg.1.sh --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.8anL89cvRR/S.dirmngr' failed: IPC connect call failed
gpg: keyserver receive failed: No dirmngr

The new signing key installs properly (curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -, but this key still doesn't allow me to download from the apt source.

sudo apt-key list
...
pub   rsa2048 2015-10-28 [SC]
      BC52 8686 B50D 79E3 39D3  721C EB3E 94AD BE12 29CF
uid           [ unknown] Microsoft (Release signing) <[email protected]>

Then this is the error when doing the sudo apt-get update

Err:4 https://packages.microsoft.com/repos/azure-cli bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B02C46DF417A0893
Reading package lists... Done
W: GPG error: https://packages.microsoft.com/repos/azure-cli bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B02C46DF417A0893
E: The repository 'https://packages.microsoft.com/repos/azure-cli bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Expected behavior
Either the old or new signing key allows me to sudo apt-get update from the az apt source.

Environment summary
Bash on Windows with 18.04 (bionic) LTS

Additional context
lsb-release and dirmngr are installed and the latest versions.

Packaging

Most helpful comment

I have the same issue. Running Ubuntu 18.04 from the Windows store via Windows subsystem for Linux.

All 5 comments

I have the same issue. Running Ubuntu 18.04 from the Windows store via Windows subsystem for Linux.

Thank you @paulkel for the temporary workaround! I verified this did the trick for me.

Same here! workaround worked flawlessly. Thanks @dtzar & @paulkel

Thank you for reporting this issue. We're aware of it now. We're in the process of switching the old repository key to a new one. I will post back when the process is done.

These steps work now after the update to the signing key, so closing it out.

Was this page helpful?
0 / 5 - 0 ratings