Skip to content

REQ - Guide for using environment variables #172

Description

@Moohan

Is your feature request related to a problem? Please describe.
Inspired by this question (and mainly @rmccreath 's response): @bevthewitch - Can PHS GItHub members view a private PHS GitHub repo?.

The issue of mostly shareable code containing small bits of confi / potentially confi info, e.g. an API key.

Describe what you'd like
A guide explaining and setting best practice for storing and using environment variables, e.g. using the .Renviron (project or personal as required), and Sys.getenv() to retrieve sensitive info at execution without having it verbatim in code and therefore commitable by version control.

Describe alternatives you've considered
Environment variables are a good solution, in certain cases, {keyring} may be better as it also provides encryption. Similarly, saving a text file to disk and using readLines() might also be appropriate for data that needs to be used by a few PHS staff.

Additional context
Somewhat related to #86 but has a different set of usecases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    new docNew doc or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions