Skip to content

Error: Missing key, key or keyFile option must be provided! #261

Description

@Lordink

While using gcloud on my own local server, I write:

var gcloud = require('gcloud');
var bucket;

bucket = gcloud.storage.bucket({
    projectId: 'myProjectName',
    keyFilename: 'resources/key.json',
    bucketName: 'testnameorwhatever'
});

bucket.write('demo.txt', 'Hello World', function(err) {
        var stuff = err || 'Created demo.txt'
        console.log(stuff);
});

if I do specify the right path to the key, it gives this output (not thrown error, just console log):
[Error: Missing key, key or keyFile option must be provided!]
I do not understand this message. There is a key specified, and the path to it is right. I know that, as if I write the wrong keyFilename path, it throws ENOENT error 34. So, is it about the key description or something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions