Using gpg and gitattributes together

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Schindelin
Date: Tuesday, February 26, 2008 - 5:13 pm

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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using gpg and gitattributes together, Johannes Schindelin, (Tue Feb 26, 5:13 pm)
Re: Using gpg and gitattributes together, Johannes Schindelin, (Fri Feb 29, 7:59 am)
Re: Using gpg and gitattributes together, Jeff King, (Fri Feb 29, 1:02 pm)