r-lib / keyring

:closed_lock_with_key: Access the system credential store from R
https://keyring.r-lib.org/
Other
196 stars 28 forks source link

Colon character not allowed in environment variables in BASH #59

Closed cantpitch closed 3 years ago

cantpitch commented 6 years ago

Currently, the env backend uses the colon (:) to separate the service from the user name, however this is technically invalid and makes it difficult to set that environment variable before running an R script that relies on it.

e.g. /# export Test:testuser=testpassword bash: export: 'Test:testuser=testpassword': not a valid identifier

I recommend using a different character string (like "__" -- two underscores).

gaborcsardi commented 6 years ago

You can set it from within R, e.g. via an .Renviron file.

gaborcsardi commented 3 years ago

I agree this is not ideal, but as the env backend is not that important any more, I am going to close this. You can still set the env vars in R or from .Renviron. But it is in general better to use the 'file' backend.