-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Storing complex secrets #749
Copy link
Copy link
Closed
Description
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:
-----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, Secret values with leading dashes are parsed as the incorrect number of args #80
now secret add google-private-key -b $(echo "<full key>" | base64)- Only gives me "[object Object]" in js, see Secret values with leading dashes are parsed as the incorrect number of args #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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels