git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using gpg and gitattributes together
@ 2008-02-27  0:13 Johannes Schindelin
  2008-02-29 14:59 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2008-02-27  0:13 UTC (permalink / raw)
  To: git

Hi,

I just added my .netrc to a repository where I track some files that I 
would hate to lose.  However, since I mirror that repository to a machine 
where other people than me have root access, I thought that I encrypt the 
file with gpg.

To make this procedure more convenient for me, I decided not to encrypt 
with a private key, but with a passphrase, and to use gitattributes to do 
the encryption for me:

$ echo 'netrc filter=gpg' > .gitattributes
$ git config filter.gpg.clean 'gpg --cipher-algo AES256 -c'
$ git config filter.gpg.smudge 'gpg --decrypt'
$ git add netrc

It asks quite a few times for the passphrase (as expected), but I had to 
add the file twice (not expected).  However, since it worked now, I am 
happy.

Maybe somebody else will find this information useful.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-29 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-27  0:13 Using gpg and gitattributes together Johannes Schindelin
2008-02-29 14:59 ` Johannes Schindelin
2008-02-29 20:02   ` Jeff King

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 NNTP newsgroup(s).