@coola try /workspace/credentials/gcs-credentials.json
Oct 3, 2020
9
Level 1
Laravel Google App Engine credentials file not found
I have a Laravel application which works fine locally. But when I deploy to Google App Engine (GAE) Standard it cannot locate the storage credentials for Google Cloud Storage (GCS).
Usually this is stored in a json file located in the credentials folder like:
GOOGLE_CLOUD_KEY_FILE="C:/laravelproject/credentials/gcs-credentials.json"
While deploying in my app.yaml I have specified it as:
env_variables:
GOOGLE_CLOUD_KEY_FILE: "/credentials/gcs-credentials.json"
But I get an error message in the logs as:
PHP Notice: Google\Cloud\Core\Exception\GoogleException: Given keyfile path /credentials/gcs-credentials.json does not exist
at Google\Cloud\Storage\StorageClient->configureAuthentication (/workspace/vendor/google/cloud-core/src/ClientTrait.php:133)
I have also tried
env_variables:
GOOGLE_CLOUD_KEY_FILE: "/tmp/credentials/gcs-credentials.json"
and
env_variables:
GOOGLE_CLOUD_KEY_FILE: "/credentials/gcs-credentials.json"
and
env_variables:
GOOGLE_CLOUD_KEY_FILE: "./credentials/gcs-credentials.json"
So my question is how do I specify the gcs credentials file for the GAE Standard environment in my app.yaml?
Level 27
1 like
Please or to participate in this conversation.