Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 26, 2022 01:26 am GMT

backup the .env files to git/gist/dropbox in school way!

Hi guys...

Here is a little tip that I like.

Sometimes we need to save the local.env, prod.env file or the stg.env file ... But you don't look where is the best place to backup it .. adding to git it's not a good idea because you are storing secrets is very dangerous...

exists projects like git-secrets1, but in my opinion, it's another layer of knowledge you need to dominate.

let's keep it simple:

cp .env local.envgpg --armor -c local.env # enter a passwordls local.env.asc # file encrypted created

with that you have a file encrypted symmetrical and it can be stored on your:

$ git add *.asc # your git$ cp *.asc ~/Dropbox # your dropbox$ gh gist create local.env.asc # to gist 

For decrypt:

gpg -d local.env.asc # entering the password

When your coworkers saw that they will say:

what are you doing? soo old school!!

oldschool


Original Link: https://dev.to/zodman/backup-the-env-files-to-gitgistdropbox-36j4

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To