git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: can Git encrypt/decrypt .gpg on push/fetch?

From
Jeff King <peff@peff.net>
Date
Sep 9, 2011, 18:42 UTC
Message-ID
<20110909184229.GE28480@sigill.intra.peff.net>
In-Reply-To
<4E6A165D.5010703@drmicha.warpmail.net>
On Fri, Sep 09, 2011 at 03:36:29PM +0200, Michael J Gruber wrote:
Show 6 quoted lines
> A) Keep blobs and checkout encrypted
> - Use an editor which can encrypt/decrypt on the fly (e.g. vim)
> - Use "*.gpg diff=gpg" in your attributes and
> [diff "gpg"]
>         textconv = gpg -d
>   in your config to have cleartext diffs. Use cachetextconv with caution ;)
I use something like this for my password store, though I use:
  textconv = gpg -qd --no-tty

to keep things as clean as possible. Running gpg-agent is a must, of course.

The wallet itself is just a gpg-encrypted YAML file, with a few scripts grep within the hierarchy. I'm happy to share the code if anybody is interested. I've also written firefox hooks to fill website form fields, but that code is a little gross.

Show 9 quoted lines
> B) Keep blobs encrypted, checkout decrypted
> - Use Use "*.gpg filter=gpg" in your attributes and
> [filter "gpg"]
> 	smudge = gpg -d
> 	clean = gpg -e -r yourgpgkey
>   in your config.
> 
> I use A on a regular basis. B is untested (but patterned after a similar
> gzip filter I use). You may or may not have better results with "gpg -ea".
Yeah, I think that would work but have never tried it either.
-Peff
Previous: Ted ZlatanovNext: Junio C Hamano
Message 6 of 9 in “can Git encrypt/decrypt .gpg on push/fetch?”
  1. Ted ZlatanovSep 9, 2011
  2. Aneesh BhasinSep 9, 2011
  3. Ted ZlatanovSep 9, 2011
  4. Michael J GruberSep 9, 2011
  5. Ted ZlatanovSep 9, 2011
  6. Jeff KingSep 9, 2011
  7. Junio C HamanoSep 9, 2011
  8. Michael J GruberSep 9, 2011
  9. Jeff KingSep 9, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.