Monday 28 February 2022

Weirdness with the IBM Cloud CLI tool

A friend of mine was having some interesting fun and games with the IBM Cloud CLI tool: -

ic plugin install vpc-infrastructure

Looking up 'vpc-infrastructure' from repository 'IBM Cloud'...

FAILED

Unable to fetch plug-ins from repository 'IBM Cloud':

invalid character '<' looking for beginning of value

and: -

ic plugin repo-plugins -r "IBM Cloud"

Getting plug-ins from repository 'IBM Cloud'...

FAILED

Unable to fetch plug-ins from repository 'IBM Cloud':

invalid character '<' looking for beginning of value

When we checked, she was on a back-level version: -

ic version

ibmcloud version 1.2.3+3577aee-2020-09-25T14:55:44+00:00

so we tried to get it updated: -

ic update

Checking for updates...

FAILED

An error occurred when fetching latest CLI info:

invalid character '<' looking for beginning of value

We even tried enabling debug: -

export IBMCLOUD_TRACE=true

as, under the covers, the CLI tool is making a LARGE number of REST API calls, but still saw: -

invalid character '<' looking for beginning of value

**AND** a bunch of HTML

This implied that the old back-level CLI was getting some HTML from the IBM Cloud CLI endpoint, which wasn't ( obviously ) valid JSON, and was thus choking the CLI.

The mitigation was to install a new fresh up-to-date copy: -

curl -fsSL https://clis.cloud.ibm.com/install/osx | sh

and then we were off to the races: -

ic version

/usr/local/bin/ibmcloud version 2.5.0+3bf759b-2022-02-24T21:48:22+00:00

No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...