首页 文章

Bluemix APIConnect从命令行发布环回项目

提问于
浏览
0

我正在关注此处记录的APIC教程:

Publishing a project from the command line

我已经完成了教程中的步骤,以进入Bluemix中的APIConnect仪表板和Sandbox目录 .

我在api管理下得到了baseURL:

例如 https://api.us.apiconnect.ibmcloud.com/FREDusibmcom-dev/sb

然后我用它来

apic config:set 
catalog=apic-catalog://api.us.apiconnect.ibmcloud.com/orgs/FREDusibmcom-dev/catalogs/sb 
app=apic-app://api.us.apiconnect.ibmcloud.com/orgs/FREDusibmcom-dev/apps/acme-bank-Fred

根据说明,我尝试使用我的Bluemix凭据登录

apic login --server api.us.apiconnect.ibmcloud.com -u fred -p mypassword

这失败了:

ERROR Login to api.us.apiconnect.ibmcloud.com failed, please verify the servername and credential

我在使用的服务器名称或凭据方面做错了吗?谢谢!

2 回答

  • 1

    对于login命令中的 server 参数,请改用 us.apiconnect.ibmcloud.com . 我认为 api 部分正在抛弃一切 .

    一旦成功,我还建议您运行 apic edit 并继续 Log in with Bluemix ,因为这将确保您能够从CLI或API Designer将应用程序发布到Bluemix .

  • 0

    我假设你使用的是实际的用户名/密码,而不是“fred / mypassword” .

    如果是这样,那么问题可能在于Bluemix URL . 现在有一种更简单的方法来获取应用程序标识符和目录标识符(并确保您拥有正确的Bluemix基本URL) . 目录和应用程序磁贴现在有一个链接图标,您可以单击以轻松复制目录/应用程序标识符:

    Geting the catalog identifier

    Bluemix基本URL将紧跟在目录标识符中 apic-catalog:// 之后的部分 .

    我们正在用这个更新文档 .

相关问题