Not able to login to ibmcloud using CLI

4/16/2019

I am trying to login to ibmcloud using command --> ibmcloud login --sso. I am getting this error -->

PS C:\windows\system32> ibmcloud login --sso API endpoint: https://cloud.ibm.com

API endpoint: https://cloud.ibm.com Region: Not logged in. Use 'C:\Program Files\IBM\Cloud\bin\ibmcloud.exe login' to log in. FAILED Could not get IAM configuration: Get https://iam.cloud.ibm.com/identity/.well-known/openid-configuration: dial tcp 1XX.XX.3X.XX:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I have also tried to login using my account credentials through CLI ..Still i am not able to login. Earlier when I had installed IBM Cloud CLI I was able to login. Now suddenly I started getting this error.

I am able to login to cloud.ibm.com through browser but not through CLI.

-- Apurva
ibm-cloud
ibm-cloud-plugin
kubernetes

2 Answers

4/17/2019

Based on the IAM error try

ibmcloud login --no-iam

-- chughts
Source: StackOverflow

4/16/2019

Looks like you are trying to login after longtime. If you are still facing the issue, try to unset the api endpoint & login again.

ibmcloud api --unset

Ref

-- vinodk
Source: StackOverflow