0
votes

I'm trying to login Cloud Foundry endpoint. But when I connect by Cloud Foundry CLI, I get a error message below:

C:\Users\abc>cf login -a https://xxx.predix-
uaa.run.aws-usw02-pr.ice.predix.io
API endpoint: https://xxx.predix-uaa.run.aws-us
w02-pr.ice.predix.io


Not logged in. Use 'cf login' to log in.
FAILED
Error performing request: Get /login: unsupported protocol scheme ""

Please help!

1
What can I do now? - LazyCatIT
Check the trace using the -v option: cf login -a https://xxx.predix-uaa.run.aws-usw02-pr.ice.predix.io -v. The first request (GET /v2/info) should return a JSON formatted list with information about your CF deployment, incl. urls to "login". Does it? If not, that's the wrong API endpoint url. - dkoper
@dkoper Yes, it return a JSON formatted list. - LazyCatIT
The error message is not clear. Please submit an issue to our issue tracker (github.com/cloudfoundry/cli/issues/new). It would help if you could share the /v2/info output if you can. - dkoper
@dkoper I have added new issue for it. Please help me check with the link: github.com/cloudfoundry/cli/issues/1148 - LazyCatIT

1 Answers

0
votes

The issue is likely that you are not specifying your CF API endpoint url. Please contact your platform operator to confirm what it should be.

We'll improve the error message, but what seems to be happening is that the cf CLI tries to retrieve a json configuration from [api-endpoint]/v2/info, but not getting the response it expects.
It then builds a URL to the login endpoint from the "authorization_endpoint" that should be advertised in that json configuration. As that field is not in your response, it tries to access "/login" instead of e.g. "https://xxx.predix-uaa.run.aws-usw02-pr.ice.predix.io/login", causing the error.

CF endpoint urls generally start with "api.". In fact, I've never seen one starting differently.