public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Morten Kjærulff" <mortenkjarulff@gmail.com>
To: cygwin@cygwin.com
Subject: Protecting .netrc
Date: Sat, 4 Apr 2020 13:41:12 +0200	[thread overview]
Message-ID: <CA+7cx1oXomuqvZLr1uNAbsdJ1M5M6cKgKsptJi0=C+TbGaCZaQ@mail.gmail.com> (raw)
In-Reply-To: <CA+7cx1pHS+=+h15rUZ5biSwKb=mxprMx7VadRRqm4Q4MYj+ewg@mail.gmail.com>

Hi.

No need to say that putting passwords in plain text file is a bad idea.
But if I use .netrc, wouldn't below be a bit (lot?) safer?
Assuming I have a good passphrase on my key.

It seems so simple, that I fear I am not getting anything out of it.

Morten

#!/bin/sh

# Install utils/gnupg2

# gpg2 --generate-key

# mkdir ~/secrets

# gpg2 -e -r YOU@EMAIL.COM <~/.netrc >~/secrets/netrc.enc

# rm ~/.netrc

# mkfifo ~/.netrc

while true ; do
  gpg2 -d <~/secrets/netrc.enc >~/.netrc
done

           reply	other threads:[~2020-04-04 11:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CA+7cx1pHS+=+h15rUZ5biSwKb=mxprMx7VadRRqm4Q4MYj+ewg@mail.gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+7cx1oXomuqvZLr1uNAbsdJ1M5M6cKgKsptJi0=C+TbGaCZaQ@mail.gmail.com' \
    --to=mortenkjarulff@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).