Background
GitHub allows you to store Encrypted Secrets (Settings > Codespaces > Codespaces secrets), which is an amazing feature. For security, secrets stored this way are never visible to you once they are stored.
However, while hacking on something new, I find that it’s useful to be able to see my secrets and other environment variables occasionally. Typically, when hacking on a local project, I’ll store my secrets in a .env
file, which is kept out of source control by listing it in my .gitignore
file.
Issue
I’d like to do the same with GitHub Codespaces: store a gitignore’d .env
file in my Codespace that is visible only to me.
However, with GitHub Codespaces living in the cloud, it is unclear whether this .env
file would be somehow visible to others.
Question
If I gitignore a .env
(or any other) file in my GitHub Codespace, is that file going to be somehow visible via the Codespace to others?