I am currently publishing my passwords in my code to connect to my database in work
. The code looks a little bit like the below
library(odbc) myconn <- dbConnect(odbc::odbc(), "Database_Prod", timeout = 15, uid = 'jsmith', pwd = 'foo')
I would like to publish my code to our internal GitHub but do not want to fall into the mistake of publishing my credentials by accident. I would also like to put my script on a schedule so that I can just let it run without any interference from me.
I have seen the post about the package
keyring but it looks from my playing around with it that it prompts you for your password which would mean i wouldn't be able to schedule my work. I could i suppose save all my credentials in a config.R script and then source it but then the credentials are still in open text on my PC
Has anyone come across this problem before?
Thank you for your time