Q:

{ [Error: private_key and client_email are required.] code: 'MISSING_CREDENTIALS' }

I'm trying to upload file to google cloud storage with node js, but I keep receiving error:

'{ [Error: private_key and client_email are required.] code:
  'MISSING_CREDENTIALS' } '

 var gcloud = require ('gcloud') ({
        projectId: 'my project',
        keyFilename: '/keyFile.json
}) 

var gcs = gcloud.storage ();

    var backups = gcs.bucket ('backups'); backups.upload ('a.pdf', function (err, file) {
        if (err)
            return err;

    });

A:

It sounds like you are providing a JSON file for an OAuth client rather than a service account private key. Go to the Service Accounts page in Google Developers Console and create a new JSON key for either a new or existing service account.

