You can also use the clipboard, via pbpaste on macOS and xclip on Linux (not sure how to do that on Windows).
Example:
# Copy your NPM deploy token to clipboard, then:
$ travis encrypt $(pbpaste) --add deploy.api_key --com
Then if you call history, you only get
$ history
travis encrypt $(pbpaste) --add deploy.api_key --com
It works wonders for injecting secrets copied from a web browser (tokens, API keys, obtained from an admin panel) in the environment without revealing anything.
You can also use the clipboard, via pbpaste on macOS and xclip on Linux (not sure how to do that on Windows).
Example:
Then if you call
history
, you only getIt works wonders for injecting secrets copied from a web browser (tokens, API keys, obtained from an admin panel) in the environment without revealing anything.
Intresting, thanks!
Thanks for this! It’s what I was looking for