Commit Graph

165 Commits

Author SHA1 Message Date
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
2019-03-20 08:03:28 -04:00
Josh Rabinowitz
71f3d3a4ac
Make sure we name temp files 'git-secret-*' (#428)
* pass mktemp a template on linux
* name tempfiles git_secret, not gitsecrets
2019-03-17 19:32:42 -04:00
Josh Rabinowitz
f68a56ecd8
Add to changelog, rename function, add comment. (#408) 2019-03-09 20:12:45 -05:00
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
2019-03-09 18:49:45 -05:00
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
2019-03-07 17:46:51 -05:00
Josh Rabinowitz
bab5c739ff
Use SECRETS_GPG_COMMAND in gpg version check (#389)
Closes #388
2019-03-05 16:51:59 -05:00
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
2019-03-05 08:41:13 -05:00
Josh Rabinowitz
e2754adebe
Doc changes 2019 02 for #351 (#353)
* clarification about killperson and secrets, rephrasing.
* how to develop without docker/test-kitchen
* doc changes about gh-pages branch. other clarifications.
* OSX has been renamed MacOS (except in travis-ci)
2019-03-05 07:09:27 -05:00
Josh Rabinowitz
83b03b61bc
Aspell fixes (#365)
* spellcheck fixes from aspell
2019-02-21 15:20:34 -05:00
Flávio Caetano
9e9803d561 add secret files pattern to .gitignore on init (#359) 2019-02-20 00:10:18 +03:00
krufab
dc564d90ce Removed unneded redirection of path_mappings (#326) 2019-01-27 10:29:25 -05:00
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
2019-01-26 22:59:13 -05:00
Josh Rabinowitz
6e43cd310f
remove unused functions (#313)
* remove unused functions
* Note that we removed unused functions in CHANGELOG.md
2019-01-24 11:57:07 -05:00
Josh Rabinowitz
94d5ae43d1
bump version to 0.2.5 (#297) 2019-01-15 08:35:11 -05:00
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
2019-01-01 09:37:11 -05:00
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
2018-12-05 09:43:48 +03:00
Josh Rabinowitz
74f8a07166
improve testing regarding expired keys and keys with only email addresses (#262)
* test that hiding secret with expired key fails
* add test of user key without username.
* revert to performing most tests with 'user1'.
* move user4 private/public key fixtures
* factor code fetching emails from keyrings, add comments.
* use factored _warn_or_abort()
* add to, clean up, and clarify comments.
2018-12-01 08:48:09 -05:00
Josh Rabinowitz
337010c625
only increment count of hidden files for hidden files (#282) 2018-11-30 18:09:02 -05:00
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
2018-10-10 21:21:58 -04:00
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
2018-09-26 00:08:44 +03:00
Josh Rabinowitz
6251fae396 support FreeBSD (#260)
* start FreeBSD support

* permissions change

* improve command to fetch permissions.

* note we use 'shasum' and not 'sha256sum' on osx and freebsd
2018-09-22 23:08:21 +03:00
joshr
2383e1fe67 use '-n', not '! -z', as per shellcheck SC2236 2018-09-07 16:09:08 -04:00
joshr
481d750af4 comment about SECRETS_DIR 2018-08-24 11:19:15 -04:00
joshr
5a00250da9 add comments about SECRETS_DIR environment variable 2018-08-24 11:18:40 -04:00
joshr
5d5392232b remove debug code 2018-08-18 10:31:57 -04:00
joshr
645fc2370e change preserve option from -C to -P 2018-08-18 10:09:58 -04:00
joshr
835fe80d8f set permissions when hiding files. change option to -C. 2018-08-18 09:16:50 -04:00
joshr
84c9502015 Merge branch 'master' into file-perms-172 2018-08-18 08:43:47 -04:00
Luis Rascão
80e4908471 Allow per-command configuration of custom secrets dir (#247)
Typical use case is when you want different people to have access
to some files and other people access to other different files.
2018-08-18 12:59:07 +03:00
joshr
cfdca85469 fixes, use _get_encrypted_filename, show TAP diag output 2018-07-22 23:13:12 -04:00
joshr
d73e1081be cleanup 2018-07-22 22:43:06 -04:00
joshr
a86e6ec552 remove unused code 2018-07-22 22:41:57 -04:00
joshr
505428f837 quoting fixes 2018-07-22 22:41:32 -04:00
joshr
2a1a8cb58b fixes for lint and typo 2018-07-22 21:41:04 -04:00
joshr
fda5a0ad21 fixes and debug for 'reveal -c' option 2018-07-22 21:29:01 -04:00
joshr
ffc50acd6a add os-based versions of get_octal_perms 2018-07-22 21:28:33 -04:00
joshr
2e7d6a12a5 add -c (preserve permission) option to reveal. For #172 2018-07-22 16:13:06 -04:00
Josh Rabinowitz
246825c658
fix for keys with only emails, and no usernames. Closes #227 (#240)
* test and fix for keys with only emails, and no usernames. Closes #227
2018-07-17 12:01:16 -04:00
joshr
5c639cf8e7 fixes for filenames with spaces
_list_all_added_files() now sets 'filenames' var, and
fixed quoting when updating hashes.
2018-07-14 15:19:47 -04:00
joshr
bb2253af8a remove debug code, see #237 2018-07-14 15:19:11 -04:00
joshr
b2f00fd32c fixes for filenames with spaces
quoting improvements, and
_list_all_added_files() now sets a global 'filenames' array.
2018-07-14 15:17:27 -04:00
joshr
826dfeb5d4 remove unneeded code 2018-07-13 08:24:30 -04:00
joshr
a7eaa6013c fix for issue #230, when git-secret is run in subdir of repo 2018-07-12 09:52:19 -04:00
joshr
4b847298ef restore unquoted variable and comment about it. shellcheck tweak. 2018-06-30 16:20:24 -04:00
joshr
65a7118d25 restore small optimizations. quote variable for shellcheck. 2018-06-30 16:00:53 -04:00
joshr
adc522a9d3 allow spaces in path
for issue #135, regarding spaces in pathnames
2018-06-30 15:38:46 -04:00
Simon Massey
1f2fb99a0a
Full stop changed to comma 2018-06-30 15:19:14 +01:00
Josh Rabinowitz
99f2229038 mention 'add' has an option, and that each command has options 2018-06-30 09:54:23 -04:00
Josh Rabinowitz
31e5528fac Clarify that 'git-secret-add' doesn't alter .gitignore by default 2018-06-28 13:14:41 -04:00
Josh Rabinowitz
28377b138c fix typos 2018-06-21 08:21:52 -04:00