0
votes

I have Azure DevOps pipelines using my Windows Self-hosted agent on my intranet.

I want pipelines to create universal packages and I read that I must install an extension to Azure-Cli on the agent for this.

After several errors where system team helped me setup proxy and all, I run this command in elevated command prompt: az extension add --name azure-devops

I have this error message: Unable to get extension index. Response body does not contain valid json. Error detail: Expecting value: line 1 column 1 (char 0)

What could be the issue ?

2
May I know that how's the things going now? Does below work around can achieve what you want? Feel free to leave comment below if you still has any questions. - Merlin Liang - MSFT
I reworked the certificates that are on the server and now wait for some internal help, the answer was helpfull thanks. - ClaudeVernier

2 Answers

0
votes

First of all, as Doris said, you need meet the most basic conditions for installing the azure-devops extension, that is, the version of az cli should be higher than 2.0.69. But as far as I know, this should not be the cause of issue you encountered.

enter image description here

azure cli along with extensions are all built with python. So you will find that "Error detail: Expecting value: line 1 column 1 (char 0)" is a normal JSONParseDecode error if you google it. It has many causes, like empty response, non-json response content, 500/503 error and etc. Without internet trace, I'm afraid it's hard to find the exact cause of it.

Work around:

========================================

To work around this issue so that you can use az devops command to achieve your goal, you can follow below steps:

1) Install the corresponding whl file into your local machine.

2) Retrieve the downloaded whl file location, then run this command from your command line(Here I would show you the sample script I used):

az extension add --source C:\Users\merlinl\Downloads\azure_devops-0.18.0-py2.py3-none-any.whl

3) Now you will see that the azure-devops installed successfully.

enter image description here

0
votes

Check your CLI version.

You must have at least v2.0.69, which you can verify with az --version command. Refer to this.