How do I get the password when copying data to cloudant bluemix?

I am trying to replicate a database in cloudant and I have added the database name in the My Databses tab. When clicked on the button, repeat the password prompt I used my bluemix password but it doesn't work.

can anyone help get this password?

+3


source to share


2 answers


when replicating a database, cloudant does not accept the bluemix password. You can simply follow these steps here: 1) go to your dashboard and clock in your app. 2) Blank Clouds NoSQL must be listed as a service in your application. 3) click to show credentials 4) it will provide you with a list of different accounts and also your username and password will be listed. your password will be in the following form: "password": "3b0c7b5305daa1616130e4d3e29a24b15a879215ccd56f568396110d55241041",



copy all the characters under the quotes, this will be your password.

+2


source


This issue has already been addressed below:

https://developer.ibm.com/answers/questions/23347/accessing-vcap-services-environment-variable-via-bluemix-dashboard.html

In short, you need to use VCAP_SERVICES to access all db details (via dashboard) and include your application code in it.



Below is a usgae example from VCAP_SERVICES in node.js + mongodb to get all the details (including passwd) generated with the bluemix toolbar:

console.log('VCAP SERVICES: ' + JSON.stringify(process.env.VCAP_SERVICES, null, 4));

var mongoUrl;

if(process.env.VCAP_SERVICES) {

var vcapServices = JSON.parse(process.env.VCAP_SERVICES);

for (var svcName in vcapServices) {

if (svcName.match(/^mongo.*/)) {

  mongoUrl = vcapServices[svcName][0].credentials.uri;

  mongoUrl = mongoUrl || vcapServices[svcName][0].credentials.url;

  break;

}

}

      

Hope this helps.

+2


source







All Articles