Any support for environment variables/secrets?
I'm looking to pip install a Python package from a private GitHub repository. Is there any functionality to securely store something like a GitHub token associated with a specific report so that it could be leveraged on a scheduled run?
Hi Ian Robertson at the moment it's not possible to pip install a package from a private GitHub repository. Basically, for anything that has not been published on CRAN or https://pypi.org/, R and Python's respective official community repositories, pip install won't be able to work in this case. In the meantime, I'd be happy to relay your requests to the product team. Thanks for writing in!
Ian Robertson In regards to environment variables/secrets, support for storing key/secrets/any kind of credentials as variables in a secure environment within Mode is definitely on our roadmap. In the interim, we usually recommend against exposing sensitive information directly in the Notebook code. We will also keep you in the loop regarding when this functionality is available in Mode.
In order to make the value of the variable a secret, you can invoke the -e using @ as the value followed by the name or id of your secret:
▲ now -e MY_VARIABLE=@acme-api-key
You can also include -e multiple times:
▲ now -e API_KEY=@my-key -e APP_NAME="ZEIT, Inc"
And we also have the capability to inherit from your shell's environment. To do so, just skip the =value part: