如何从命令行配置 Bluemix SingleSignOn 服务?

How to configure the Bluemix SingleSignOn service from the command line?

我使用

在 Bluemix 中创建了一个 SingleSignOn 服务 (SSO) 实例

cf create-service

现在,当我尝试部署使用该服务的应用程序时,我收到以下消息:

CTJSO0015E The service instance with ID \"xxxxxxxxxx\" in the region \"xxxxx\" must be configured before the operation can be performed. If you are attempting to create a new service and bind it to your application in a single step, your service instance should already be created in your dashboard, but you must configure it before binding it to an application. Configure the service and try binding the application again.

我想自动部署所有这些,所以我唯一的选择是命令行。我知道有很多选择,我想我会选择数据库(似乎是最简单的可能性)。 Google 或者 Facebook 登录也可以。

如何使用命令行配置服务?

您可以在此处查看有关 SSO 的故障排除:https://www.ng.bluemix.net/docs/#troubleshoot/SingleSignOn/ts_index.html#sso_troubleshooting

在这种情况下:

如果您在创建服务实例时尝试绑定应用程序,添加服务任务将失败并显示以下错误消息:

CTJSO0015E The service instance with ID svcinstanceid must be configured before the operation can be performed.

单点登录服务不支持将应用程序绑定到未配置的服务实例。您必须先完成服务实例的创建,然后才能将应用程序绑定到它。当您不绑定应用程序时,服务创建成功。然后,你必须使用 UI\dashbord 服务来配置它。