git-secret: git secret adding a tracked file fails with ambiguous message "file_name is not a file. abort"
What are the steps to reproduce this issue?
git secret add -i already_tracked_filename
What happens?
File not added, operation aborted.
What were you expecting to happen?
- Option 1: File to be added to the “to encrypt” files list. Or
- Option 2: See a meaningful message telling that tracked files can’t be added to the list and advise me to untrack the file myself with a
git rm --cached already_tracked_filename
Any logs, error output, etc?
already_tracked_filename is not a file. abort.
Any other comments?
@sobolevn which option do you prefer 1 or 2? I’m asking because I’m interested in working on it (if I find time).
What versions of software are you using?
Operating system: (uname -a) …
Linux instance-2-git-secret 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3 (2017-12-03) x86_64 GNU/Linux
git-secret path: (which git-secret) …
/usr/local/bin/git-secret
git-secret version: (git secret --version) …
0.2.2
git version: (git --version) …
git version 2.11.0
Shell type and version: ($SHELL --version) …
GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
gpg version: (gpg --version) …
gpg (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /home/sayhi_aymen/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 18 (6 by maintainers)
I’ve sent Debian a reminder about this - I hope it helps a bit.
@joshrabinowitz I think that option 2 provided by @aymens is good enough:
@sandorgazdag this is on my todo list, I’ll do it as soon as I can.
In the meantime you can simply do
git rm --cached the_already_tracked_filenamebefore doing thegit secret addfor each tracked file you want to encrypt.Same here