rstudio / rscloud

Managing RStudio Cloud spaces with R
https://rstudio.github.io/rscloud
Other
22 stars 11 forks source link

Support for environment variables #11

Closed coatless closed 4 years ago

coatless commented 5 years ago

Instead of having a config.yml in the working directory, how would you feel about two environment variables with this information?

https://github.com/rstudio/rscloud/blob/85b286847dbe30db19b09a4dde5dd38b1aa4b6f3/R/setup.R#L12-L14

tareefk commented 5 years ago

We could provide a default config.yml that looks for the variables in the environment. I thought this would be easier as a starting point.

coatless commented 5 years ago

@tareefk I'm thinking here two environmental variables sitting in .Renviron, e.g.

RSCLOUD_CLIENT_ID="..."
RSCLOUD_CLIENT_SECRET="..."
GITHUB_TOKEN="..."
tareefk commented 5 years ago

Right, but my point is that we can easily have a default config.yml file in people's home directory which would look for those environment variables.

kevinykuo commented 5 years ago

These credentials should be treated as secrets and not be stored in plain text and esp. not in the project directory. I think we should support environment variables (with a quick instruction on using usethis::edit_r_environ() to set them) and maybe keyring, but remove support the current auth scheme.