0

I am following the APIC tutorial documented here:

Publishing a project from the command line

I have gone through the steps in the tutorial to get into the APIConnect dashboard in Bluemix and into the Sandbox catalog.

I get the baseURL under api management:

e.g. https://api.us.apiconnect.ibmcloud.com/FREDusibmcom-dev/sb

Then I use that to

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

After this as per the instructions, I try to login using my Bluemix credentials

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

This fails with:

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

Am I doing something wrong in regards to the servername or credentials that I am using? Thanks!

ralphearle
  • 1,696
  • 13
  • 18

2 Answers2

1

For your server argument in the login command, use us.apiconnect.ibmcloud.com instead. I think the api portion is throwing things off.

Once successful there, I also recommend that you run apic edit and proceed to Log in with Bluemix there, as that will ensure that you're able to publish applications to Bluemix from the CLI or API Designer.

Matt Hamann
  • 1,488
  • 12
  • 24
0

I assume you used your actual username/password, and not "fred/mypassword".

If so, then the problem may be with the Bluemix URL. There's now a simpler way to get the app identifier and catalog identifier (and to make sure you have the right Bluemix base URL). The catalog & app tiles now have a link icon that you can click to easiy copy the catalog/app identifers:

Geting the catalog identifier

The Bluemix base URL will the part immediately following apic-catalog:// in the catalog identifier.

We're in the process of updating the docs with this.