Solution: https://github.com/zeit/now/issues/749#issuecomment-533873759 ---- Hello, I can't figure out how to store my Google API private key for use in a now deployment. The key looks something like: ``` -----BEGIN PRIVATE KEY----- lines lines lines -----END PRIVATE KEY----- ``` What I've tried: * `now secret add google-private-key "<full key>"` * Not possible because of dashes, https://github.com/zeit/now-cli/issues/80 * `now secret add google-private-key -b $(echo "<full key>" | base64)` * Only gives me "[object Object]" in js, see https://github.com/zeit/now-cli/issues/80 * Adding the key to a .env-file and then run with `now --dotenv=.env` * This seems to replace all newlines with whitespace making the auth with the key fail. * When running locally using the dotenv node package to set env vars from .env it works, it preserves newlines How should it be done?
Solution: #749 (comment)
Hello,
I can't figure out how to store my Google API private key for use in a now deployment.
The key looks something like:
What I've tried:
now secret add google-private-key "<full key>"now secret add google-private-key -b $(echo "<full key>" | base64)now --dotenv=.envHow should it be done?