Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for backup the .env files to git/gist/dropbox in old school way!
Andres 🐍 in 🇨🇦
Andres 🐍 in 🇨🇦

Posted on • Edited on

     

backup the .env files to git/gist/dropbox in old 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
Enter fullscreen modeExit fullscreen mode

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
Enter fullscreen modeExit fullscreen mode

For decrypt:

gpg -d local.env.asc # entering the password
Enter fullscreen modeExit fullscreen mode

When your coworkers saw that they will say:

what are you doing? soo old school!!

oldschool

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Mexican developer who get a job abroad in Canada
  • Location
    Guelph Ontario
  • Work
    visto.ai
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp