Commit Graph

135 Commits (master)

Author SHA1 Message Date
Ochan Kwon b0378617e2
bug fix for 'reveal' in a subdir (#903) (#905) 2 years ago
Josh Rabinowitz 6ff4d00bcd
fix links to bats docs about descriptor 3 (#892) 2 years ago
Josh Rabinowitz 77c0b27006
have hide -v show output from gnupg (#888)
* also document bug #834 and improve comments
2 years ago
Josh Rabinowitz 8345e526cd
Issue 874 locate git repo (#886)
* first step in improving error message for #874
* possible doc fix for #851
* improve comment
* update changelog
2 years ago
Josh Rabinowitz 549cd9aa24
Issue 706 decrypt errors (#831)
* check for encrypted version of file before decrypting, for #706
* improve error messages, verbose output and non-verbose output
* in tests, prefix output from git init with 'git: '
* 'clean' options only remove added files, for #833
* update changelog
2 years ago
Josh Rabinowitz 084a5256e1
for #811: allow some perm warnings in non-verbose mode (#825) 2 years ago
Josh Rabinowitz 120edded4f
Cleanups 2022 04 (#824)
* change file desc we use to pass gnupg info
* improve content and phrasing in docs
* improve docs about locations of private/public keys
* update changelog
2 years ago
Josh Rabinowitz db03c638d5
in verbose mode, show some gnupg perm warnings (#812)
* set git-secret keys dir to 700 perms, for #811
* update changelog
* test improvements
* clean up comments
* remove unused code
* update git-secret-init man page
* document change to git-secret-init
2 years ago
Josh Rabinowitz eefa10623a
changes to .gitignore usage and testing in response to #789 (#791)
* test .gitignore has expected line count, for #792
* let 'add' append filenames to .gitignore in tests
* add comments related to #789
* fix test to allow for more output from 'add'
* improve error message output
* allow for extra output from 'add' in test
* tweaks as per shellcheck lint
* improve comments, cleanup code
* update changelog
* describe test better
2 years ago
Josh Rabinowitz 50734fd364
cleanups and renames (#784)
* rename _append_* functions to _prepend_*
* improve code flow
* be more standard with shellcheck disables
2 years ago
Bryan Howard 66541e8937
remove trailing whitespace
* don't use _incorrect_usage() function as much
2 years ago
Josh Rabinowitz b6711e2ac5
re-creation of #638 fix, removing dup email keys (#700)
* re-creation of #638 fix, removing dup email keys
* Update CHANGELOG.md
2 years ago
Josh Rabinowitz 84d1f85c56
fix for #710, using cat from a subdir (#751)
* fix for #710, using cat from a subdir
* also fix using reveal with named files from a subdir
2 years ago
Josh Rabinowitz 23acae1265
Issue 630 hide armored2 (#661)
* use gpg --armor when hiding/encrypting files

* update changelog

* Adds SECRETS_GPG_ARMOR env variable

* Fixes lint

* One more test

* Addresses review

Co-authored-by: sobolevn <mail@sobolevn.me>
3 years ago
Jeppe Fihl-Pearson fae00fac3d
Rename `killperson` to `removeperson` (#685)
* Rename the "killperson" command to "removeperson"

"killperson" is unnecessarily hostile so change the command name to
"removeperson".

Fixes #684.

* Re-generate man pages

* Update contribution guide

There's no longer any pre-commit hooks so don't mention them.

* Add alias from `killperson` pointing at `removeperson`

* Update git_secret_removeperson.sh

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago
Josh Rabinowitz ee592b8ede
Issue 634 tell duplicate emails (#637)
* support asserting named keyring is missing email(s)
* improve error if git-secret keyring missing email
* new test for telling same email twice
* update tell manpage regarding duplicate emails
* regenerate man pages
* update changelog
3 years ago
Bertjan Broeksema fc51d6f15f
More precise feedback about added files (#614)
* More precise feedback about added files

This adapts the output of the add command in order to report exactly
how many files have been added. Specially with wildcard patterns, this
makes it easier to verify that expected files are added.

With the verbose option, the add command will also tell which files
have been added.

By @bbroeksema bbroeksema
4 years ago
Elisei Roca 282c36d5eb
make "usage" message easier to read (#617) 4 years ago
Josh Rabinowitz a0a176fa5d
Issue 552 508 revoked keys (#553)
* warn about 'tell' on expired/revoked/invalid keys
* error if 'tell' used on email with multiple keys
* improve test of 'tell' with subdirs
4 years ago
Josh Rabinowitz 2830ce2ff7
Issue 579 reveal clobbers (#580)
* Don't let reveal clobber secret files, for #579
4 years ago
Josh Rabinowitz 9348cd32e2
Revert "Issue 554 show gpg commands (#556)" (#559)
This reverts commit 9e8438236c.
5 years ago
Josh Rabinowitz 9e8438236c
Issue 554 show gpg commands (#556)
* show most gpg commands used for 'hide', 'reveal', 'tell' and 'killperson (#554)
* fix hang when using ctrl-c during tests (#558)
5 years ago
Josh Rabinowitz 95b5b320fc
Issue 516 verbose on errors (#518)
* add error info on errors listing keys
* move bash $TMPDIR initialization earlier
* show gpg output if hide encryption fails
* update changelog
* fix typos
* improve messaging when reveal and tell are done
* simplify logic, fix typo in error message
5 years ago
Josh Rabinowitz 701497df9d
Fix hangs when interrupting tests on OSX (#522)
* close fd 3 on gnupg subprocesses, for bats-core
* update changelog
5 years ago
Josh Rabinowitz 0faad68032
Optimize (#517)
* small optimization, update to changelog
5 years ago
Josh Rabinowitz 10fa2a7be2
Tempfile and temp directory cleanups (#473)
* Tempfile and temp directory cleanups
    Add comments about mktemp on different platforms
    Be more careful about tempfile cleanups
    Don't use find to locate files to cleanup
    Use shorter SECRETS_EXTENSION and SECRETS_DIR env settings in tests
    Set TMPDIR in tests again
    Show DESTDIR used when testing git-secret install
    Change filename passed to mktemp -t in tests
5 years ago
Simon Massey 10879e2253
fix for git secret hide -m doesn't work on first use #466 (#469) 5 years ago
Simon Massey 2164e822d2
remove dead code for keys/mapping.cfg (#464) 5 years ago
Josh Rabinowitz 24bfc86b74
Fail on extra params (#448)
* fail if user passes unexpected filenames or unknown params
* mention fix of #390
5 years ago
Josh Rabinowitz 8334d7beef
Reveal verbose (#447)
* add -v option to reveal, for #395
* update reveal man page
* shellcheck exception
* changelog update for 'reveal -v'
5 years ago
Josh Rabinowitz 07af0c19b6
Varnames output and typos (#441)
* rename variable, fix typo, improve comments and output
* fix directory removal after testing
* mention improved user messaging in CHANGELOG.md
5 years ago
Josh Rabinowitz ce8c6b3ae0
Change 'add' to add to .gitignore by default. (#429)
* Change 'add' to add to .gitignore by default.
Also add _message() function and improve output from 'git-secret-add',
alter tests for new code behavior, and update docs.
* change tests since 'add' always adds to .gitignore
* improve output: prepend more message with 'git-secret:'.
* update man page for git-secret-add
5 years ago
Josh Rabinowitz f68a56ecd8
Add to changelog, rename function, add comment. (#408) 5 years ago
Jonas Karlsson 54f74ede6a Fix for windows (#375)
* add test for travis-ci windows support
* Make 'ps' command options platform specific *nix/windows
* Add _clean_path for windows,  apply to all homedir input arguments
* export GITSECRET_DIST="windows" in git hook if running windows
* Bash lint fixes
5 years ago
Josh Rabinowitz 22fe1ed2d4
Add support for SECRETS_VERBOSE env var (#393)
* Support SECRETS_VERBOSE env var in addition to -v
* don't use --quiet when decrypting in verbose mode
* show output of gpg encryption in verbose mode
* add tests for SECRETS_VERBOSE env var set to 0 and 1
* update changelog, reorder entries.
* add tests for 'cat' and 'hide' with SECRETS_VERBOSE=1
5 years ago
Josh Rabinowitz 7b06b25c0a
Respect secrets dir on init, and document (#366)
* respect SECRETS_DIR and SECRETS_EXTENSION in tests
* add line regarding fixes to CHANGELOG.md
* test with non-standard SECRETS_EXTENSION
* Add details about init, mention SECRETS_EXTENSION in init page
* update git-secret-init man page
5 years ago
Josh Rabinowitz 83b03b61bc
Aspell fixes (#365)
* spellcheck fixes from aspell
5 years ago
Flávio Caetano 9e9803d561 add secret files pattern to .gitignore on init (#359) 5 years ago
krufab dc564d90ce Removed unneded redirection of path_mappings (#326) 5 years ago
Josh Rabinowitz 65fe4c4127
Add verbose option to 'git secret tell' showing output of key imports (#321)
* add 'git secret tell -v' option to show output of key imports
* add tests for tell with/without -v
* remove unneeded test code and bats diagnostic output
5 years ago
Josh Rabinowitz 913d026537
Fixes for 'changes' and trailing newlines, for #291 (#293)
* tests and comments about 'changes' for #291
* add 'changes' tests, improve diagnostic 
* preserve trailing newlines in diff output
* use bash trickery to preserve trailing newlines in captured text
* test 'changes' on files without newlines and when called on a non-existant file
* improve comments and variable names
5 years ago
Josh Rabinowitz 9cccf162c6 WIP: test with expired key, add 'whoknows -l' (#287)
* test with expired key, add 'whoknows -l'

    * 'whoknows -l' shows key expiration dates
    * also added docs and tests for `whoknows -l`,
    * tests for expired keys,
    * epoch_to_date functions

* update man pages

* fix epoch-to-date conversion on OSX

* test output of 'whoknows -l'

* fix for lint/shellcheck

* fix for osx

* lint fix

* use date as found in $PATH

* disable 'set -e' as little as possible
6 years ago
Josh Rabinowitz 337010c625
only increment count of hidden files for hidden files (#282) 6 years ago
Josh Rabinowitz 4a3877b486
WIP: Force mode for hide and reveal (#263)
* -F (force even if gpg fails) option for hide and reveal
* allow 'reveal' to decrypt a subset of files.
* update and regen man pages
* man pages update and improvements
* text about why all files should be hidden at once
* add _warn() and _warn_or_abort()
* tests for -F option
* glob source .sh files in Makefile better
* add comment about issue #238. cleanup error msg.
* test exact case in #253
* disable gnupg doc building on ubuntu-rolling
6 years ago
Josh Rabinowitz 9e975e4eed make sure email addresses used with 'tell' and 'killperson' exist in keyring (#267)
* name keys after emails, not usernames

* use emails to specify users

* rename and add function to get emails from keyrings
* rename directories holding gpg test fixtures

* deny emails that aren't in the keyring, and test.

* require 'killperson' emails to exist in keyring

* change test to reflect killperson must use email

* remove no-longer-needed test function

* factor function _assert_keychain_contains_emais()

* fix/make lint happy
6 years ago
joshr 2383e1fe67 use '-n', not '! -z', as per shellcheck SC2236 6 years ago
joshr 5d5392232b remove debug code 6 years ago
joshr 645fc2370e change preserve option from -C to -P 6 years ago
joshr 835fe80d8f set permissions when hiding files. change option to -C. 6 years ago
joshr cfdca85469 fixes, use _get_encrypted_filename, show TAP diag output 6 years ago