Closed nk027 closed 5 years ago
So wie es jetzt aussieht könnte man das pg
Objekt ganz selbst in der Kommandozeile erstellen oder nur das Passwort händisch eingeben (wenn das sicher genug ist).
@stefanhumer
Ich würde das in _setup.R
so lösen:
password <- readlines(prompt = "Please enter the PostgreSQL password:")
pg <- src_postgres(dbname = "dbname", host = "host", user = "user", password = password, options = "options")
Also mit allen Infos außer dem Passwort im Code. Wäre das okay? (Alternativ auch mit GetPass)
Ich bin eben über das hier gestolpert: https://github.com/r-lib/keyring Hat das Package mal jemand verwendet?
Die credentials (bzw. das Passwort) für PostgreSQL sollten nicht auf GitHub öffentlich zugänglich sein und daher auch nicht in Scripts auftauchen. Das könnte man etwa mit einer Umgebungsvariable für das Passwort oder einem Script mit dem Passwort (im
.gitignore
) verhindern.