Not entirely sure on the steps I need to take here. I have my rails app setup and ready to deploy on the google cloud platform the last thing to do is run gcloud preview app deploy
Problem is when I run it I get the errors
ERROR: Error Response: [403] Request had insufficient authentication scopes.
ERROR: (gcloud.preview.app.deploy) Could not retrieve the default Google Cloud Storage bucket for [project]. Please try again or use the [bucket] argument.
root@project-small-group-1-po7p:/home/project/site/site#
I'm pretty sure the errors are related. From looking up the error I found enabling the google storage API can fix the issue and it created default buckets for the project. The Storage API is now enabled and I can see the buckets have been enabled but the error is still there.
Maybe I need to create some sort of permissions from the servers to the buckets but I don't know if this is the problem and if it is what steps to I need to make to setup these permissions?
What do I need to do? I have 2 instances setup and an SQL instance, with a rails app setup on them.
Zachary Newman is on the right track. Check to see if you are properly authenticated into gcloud. I use one of two options for my projects:
gcloud auth login
OR
gcloud auth activate-service-account --key-file SERVICE_ACCOUNT_JSON
I use the first for my personal testing. I use the second on my CI service. To create the service account JSON, from the main menu on the Google Cloud project:
This is the only chance you'll get to save the JSON file so keep it safe.
Try that and see what happens.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With