Skip to content

Google Authentication for gcloud node

jonathanadam edited this page Jun 11, 2015 · 2 revisions

###1. Follow the instructions on gcloud npm.

Note that it is essential to have a service account; this is not the same as a web client account. Just click "Create New Service Account". The service account will generate a public/private key pair and prompt you to download a JSON file. This file should be stored in a secure, non-public location. In your config file, ensure that your gcloud config settings has a reference to this file location: keyFilename : /path/to/keyfile.json

Additionally, your gcloud config settings should have the name of the bucket in which you are working, as well as the projectId. (This projectId - not the same as your bucket name! - is generated by Google, and can most easily be found on the "Manage all Projects" page in the Google Developers Console.) Remember that buckets in Google Cloud Storage share one namespace, so you will need a unique name before you can create a new one -Google should warn you.

Clone this wiki locally