git-secret icon indicating copy to clipboard operation
git-secret copied to clipboard

Can't find any docs about `keyring.kbx~` file.

Open AKarbas opened this issue 5 years ago • 5 comments

Hi.

I'm using git-secret on a project, and recently, making a commit, I realized these files had changed:

 .gitsecret/keys/pubring.kbx                    | Bin 12366 -> 9889 bytes
 .gitsecret/keys/pubring.kbx~                   | Bin 9858 -> 12366 bytes

I can find documentation about the pubring.kbx file, but can't find anything about the pubring.kbx~ file. So, any information or pointing me in the right direction would be appreciated.

Ps. I really hope I'm not duplicating... I tried googling this but apparently ~ isn't very googlable...

Versions

**Operating system:** (`uname -a`) … Darwin HOSTNAME.local 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64

git-secret path: (which git-secret) … /usr/local/bin/git-secret

git-secret version: (git secret --version) … 0.3.2

git version: (git --version) … git version 2.24.1

Shell type and version: ($SHELL --version) … zsh 5.7.1 (x86_64-apple-darwin19.0)

gpg version: (gpg --version) gpg (GnuPG) 2.2.19 libgcrypt 1.8.5

(Edited after submitting an incomplete version, accidentaly.)

AKarbas avatar Jan 01 '20 09:01 AKarbas

By searching on gnupg "tilde" files I was able to find this page: The purpose and origin of the file "pubring.gpg~"

That page explains that gnupg uses such files as backups during modifications, and that they may safely be deleted.

So you don't need to version control .gitsecret/keys/pubring.kbx~, even though the docs currently say "Generally speaking, all the files in this directory (.gitsecret/keys) except random_seed should be checked into your repo". Maybe the docs should mention about not checking in files ending in ~.

joshrabinowitz avatar Jan 01 '20 14:01 joshrabinowitz

Thanks. 🙏

AKarbas avatar Jan 01 '20 15:01 AKarbas

I think it would be best to add such pattern to the template .gitignore file: either full *~ or narrowed down .gitsecret/keys/**/*~.

ratijas avatar Mar 04 '21 17:03 ratijas

Reopening, we should document more about this and/or handle it appriopriately in .gitignore

joshrabinowitz avatar Apr 27 '22 21:04 joshrabinowitz

+1 For handling in .gitignore, just like random_seed

realsuayip avatar Dec 08 '23 21:12 realsuayip