I am working on a privat project (marked as such) and i need to use some api key, which i should not just store as plane text in my code, i was told. I dont really get what is visible on what site and for whom. I would just assume it is safe to store it as plane text since the project is privat, but i wold like to be safe (and learn something), so how can i be sure that is not visible?
Using a turtorial, i created a new notebook1 containing my api key and i can import it in my other notebook2 and use it. But the turtorial stated that you need to make git ignore the notebook1. how can i do that?
Hello,
you have been told correctly: you should NEVER EVER EVER store any kind of secret and/or sensible information in clear text in a git repository.
Even when the project/repository is private the administrators (such as myself, but not only) would always be able to see the secret.
If you access those keys frequently and want to make their access somewhat more convenient, I suggest to look into encryption tools, such as “pass” or “SOPS” which will encrypt those secrets for you and you will be able to temporarily decrypt them with a password.
It would be fine to store those secrets in your project once they are encrypted.
Can you also suggest when should one ideally run the decryption command line (openssl enc -d -aes-256-cbc -in secret.enc -out secret.sec) during a Renku session deployment (from a post-init.sh, from the Jupyter terminal, etc.) ?