Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix key_file config #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Gilg4mesh
Copy link

No description provided.

Copy link
Contributor

@nicja nicja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what issue you're trying to fix here, this seems more like there is a problem with how you are setting your GOOGLE_CLOUD_PRIVATE_KEY environment variable..

@Gilg4mesh
Copy link
Author

Gilg4mesh commented Aug 22, 2019

Actually it might be a bug of laravel, a GOOGLE_CLOUD_PRIVATE_KEY is having many line break chars in a single string, the private key works when hard-coded in config file, but when reading private key from .env file, laravel replaced the '\n' to '\\n', and ended at 'openssl_sign(): supplied key param cannot be coerced into a private key' when uploading files.

@RafiGreenberg
Copy link

RafiGreenberg commented Dec 11, 2019

+1 ! We hit this exact same bug(?) and your PR fixes it for us. Thanks!!!

There is indeed an issue here, not sure why an issue was never created.

@nicja Are you saying that you successfully authenticated without a json file and setting the various key_file environment variables?

My GOOGLE_CLOUD_PRIVATE_KEY is set to something like this:

-----BEGIN PRIVATE KEY-----\nprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekeyprivatekey\n-----END PRIVATE KEY-----\n

there are newlines characters in there. i'm curious how you got this to work without OP's PR

@bere6255
Copy link

first google app engine do not support .env file to you are expected to move all your environment variable to a file called app.yaml eg:

runtime: php72

env_variables:

Put production environment variables here.

APP_KEY: YOUR_APP_KEY
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
SESSION_DRIVER: cookie

@RafiGreenberg
Copy link

first google app engine do not support .env file to you are expected to move all your environment variable to a file called app.yaml eg:

runtime: php72

env_variables:

Put production environment variables here.

APP_KEY: YOUR_APP_KEY
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
SESSION_DRIVER: cookie

I am not using google app engine. Your comment does not apply to this PR or to the issue in question.

@Vendin
Copy link

Vendin commented Dec 11, 2019

Cool! Works with updating this PR. Thanks.

@felipemeddeiros
Copy link

It worked. Thank you a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants