Merge pull request #142 from joshrabinowitz/git-secret-cat

Git secret cat
pull/147/merge
Nikita Sobolev 7 years ago committed by GitHub
commit 80797bcd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,11 @@
# Changelog
## Version 0.2.4
- Added `git secret cat` feature
## Version 0.2.3
- Added `-m` option to `hide` command, files will only be hidden when modifications are detected (#92)
- Changed how path mappings file works: colon delimited FSDB (#92)
- Fixed `gnupg` >= 2.1 CI tests (#6)
@ -31,7 +36,6 @@
- Refactored `hide` and `clean` commands to be shorter
- `shellcheck` is now supported with `make lint`
## Version 0.2.1
- Now everything is tested inside the `docker`-containers and `OSX` images on `travis`.

@ -85,7 +85,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
<a href="https://opencollective.com/git-secret/sponsor/9/website" target="_blank"><img src="https://opencollective.com/git-secret/sponsor/9/avatar.svg"></a>
## License
MIT. See [LICENSE.md](LICENSE.md) for details.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-ADD" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-ADD" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-add\fR \- starts to track added files\.

@ -0,0 +1,34 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-CAT" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-cat\fR \- decrypts files passed on command line to stdout
.
.SH "SYNOPSIS"
.
.nf
git secret cat [\-d dir] [\-p password] filename [filenames]
.
.fi
.
.SH "DESCRIPTION"
\fBgit\-secret\-cat\fR \- Outputs to stdout the contents of the files named on the command line by running \fBgpg \-\-decrypt\fR\. As with \fBgit\-secret\-reveal\fR, it is important to have the paired secret\-key with one of the public\-keys which were used in the encryption\.
.
.SH "OPTIONS"
.
.nf
\-d \- specifies `\-\-homedir` option for the `gpg`, basically use this option if you store your keys in a custom location\.
\-p \- specifies password for noinput mode, adds `\-\-passphrase` option for `gpg`\.
\-h \- shows help\.
.
.fi
.
.SH "MANUAL"
Run \fBman git\-secret\-cat\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR

@ -0,0 +1,27 @@
git-secret-cat - decrypts files passed on command line to stdout
=============================================
## SYNOPSIS
git secret cat [-d dir] [-p password] filename [filenames]
## DESCRIPTION
`git-secret-cat` - Outputs to stdout the contents of the files named on the command line by running `gpg --decrypt`. As with `git-secret-reveal`, it is important to have the paired secret-key with one of the public-keys which were used in the encryption.
## OPTIONS
-d - specifies `--homedir` option for the `gpg`, basically use this option if you store your keys in a custom location.
-p - specifies password for noinput mode, adds `--passphrase` option for `gpg`.
-h - shows help.
## MANUAL
Run `man git-secret-cat` to see this note.
## SEE ALSO
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-cat)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-CHANGES" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-CHANGES" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-changes\fR \- view diff of the hidden files\.
@ -31,4 +31,4 @@ git secret changes [\-h] [\-d dir] [\-p password] [pathspec]\.\.\.
Run \fBman git\-secret\-changes\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR, git\-secret\-cat(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR

@ -24,4 +24,4 @@ Run `man git-secret-changes` to see this note.
## SEE ALSO
[git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
[git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal), [git-secret-cat(1)](http://git-secret.io/git-secret-cat)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-CLEAN" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-CLEAN" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-clean\fR \- removes all the hidden files\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-HIDE" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-HIDE" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-hide\fR \- encrypts all added files with the inner keyring\.
@ -15,7 +15,7 @@ git secret hide [\-c] [\-v]
.fi
.
.SH "DESCRIPTION"
\fBgit\-secret\-hide\fR create an encrypted version for each file added by \fBgit\-secret\-add\fR command\. Now anyone from the \fBgit\-secret\fR\'s keyring can decrypt these files using their secret key\.
\fBgit\-secret\-hide\fR creates an encrypted version for each file added by \fBgit\-secret\-add\fR command\. Now anyone from the \fBgit\-secret\fR\'s keyring can decrypt these files using their secret key\.
.
.P
It is possible to modify the names of the encrypted files by setting \fBSECRETS_EXTENSION\fR variable\.
@ -36,4 +36,4 @@ It is possible to modify the names of the encrypted files by setting \fBSECRETS_
Run \fBman git\-secret\-hide\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR, git\-secret\-cat(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR

@ -7,7 +7,7 @@ git-secret-hide - encrypts all added files with the inner keyring.
## DESCRIPTION
`git-secret-hide` create an encrypted version for each file added by `git-secret-add` command. Now anyone from the `git-secret`'s keyring can decrypt these files using their secret key.
`git-secret-hide` creates an encrypted version for each file added by `git-secret-add` command. Now anyone from the `git-secret`'s keyring can decrypt these files using their secret key.
It is possible to modify the names of the encrypted files by setting `SECRETS_EXTENSION` variable.
@ -28,4 +28,4 @@ Run `man git-secret-hide` to see this note.
## SEE ALSO
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal), [git-secret-cat(1)](http://git-secret.io/git-secret-cat)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-INIT" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-INIT" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-init\fR \- initializes git\-secret repository\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-KILLPERSON" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-KILLPERSON" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-killperson\fR \- deletes key identified by an email from the inner keyring\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-LIST" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-LIST" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-list\fR \- prints all the added files\.
@ -29,4 +29,4 @@ git secret list
Run \fBman git\-secret\-list\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-whoknows(1) \fIhttp://git\-secret\.io/git\-secret\-whoknows\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-remove(1) \fIhttp://git\-secret\.io/git\-secret\-remove\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
git\-secret\-whoknows(1) \fIhttp://git\-secret\.io/git\-secret\-whoknows\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-remove(1) \fIhttp://git\-secret\.io/git\-secret\-remove\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR, git\-secret\-cat(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR

@ -22,4 +22,4 @@ Run `man git-secret-list` to see this note.
## SEE ALSO
[git-secret-whoknows(1)](http://git-secret.io/git-secret-whoknows), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-remove(1)](http://git-secret.io/git-secret-remove), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
[git-secret-whoknows(1)](http://git-secret.io/git-secret-whoknows), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-remove(1)](http://git-secret.io/git-secret-remove), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal), [git-secret-cat(1)](http://git-secret.io/git-secret-cat)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-REMOVE" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-REMOVE" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-remove\fR \- removes files from index\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-REVEAL" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-REVEAL" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-reveal\fR \- decrypts all added files\.
@ -15,14 +15,14 @@ git secret reveal [\-f] [\-d dir] [\-p password]
.fi
.
.SH "DESCRIPTION"
\fBgit\-secret\-reveal\fR \- decrypts all the files in the \fB\.gitsecret/paths/mapping\.cfg\fR by running a \fBgpg \-\-decrypt\fR command\. It is important to have paired secret\-key with one of the public\-keys, which were used in the encryption\.
\fBgit\-secret\-reveal\fR \- decrypts all the files in the \fB\.gitsecret/paths/mapping\.cfg\fR by running a \fBgpg \-\-decrypt\fR command\. It is important to have the paired secret\-key with one of the public\-keys which were used in the encryption\.
.
.SH "OPTIONS"
.
.nf
\-f \- forces to overwrite exisiting files without prompt\.
\-d \- specifies `\-\-homedir` option for the `gpg`, basically use this option if your store your keys in a custom location\.
\-d \- specifies `\-\-homedir` option for the `gpg`, basically use this option if you store your keys in a custom location\.
\-p \- specifies password for noinput mode, adds `\-\-passphrase` option for `gpg`\.
\-h \- shows help\.
.
@ -32,4 +32,4 @@ git secret reveal [\-f] [\-d dir] [\-p password]
Run \fBman git\-secret\-reveal\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-cat(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR

@ -7,13 +7,13 @@ git-secret-reveal - decrypts all added files.
## DESCRIPTION
`git-secret-reveal` - decrypts all the files in the `.gitsecret/paths/mapping.cfg` by running a `gpg --decrypt` command. It is important to have paired secret-key with one of the public-keys, which were used in the encryption.
`git-secret-reveal` - decrypts all the files in the `.gitsecret/paths/mapping.cfg` by running a `gpg --decrypt` command. It is important to have the paired secret-key with one of the public-keys which were used in the encryption.
## OPTIONS
-f - forces to overwrite exisiting files without prompt.
-d - specifies `--homedir` option for the `gpg`, basically use this option if your store your keys in a custom location.
-d - specifies `--homedir` option for the `gpg`, basically use this option if you store your keys in a custom location.
-p - specifies password for noinput mode, adds `--passphrase` option for `gpg`.
-h - shows help.
@ -25,4 +25,4 @@ Run `man git-secret-reveal` to see this note.
## SEE ALSO
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-hide(1)](http://git-secret.io/git-secret-hide)
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-cat(1)](http://git-secret.io/git-secret-cat), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-hide(1)](http://git-secret.io/git-secret-hide)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-TELL" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-TELL" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-tell\fR \- adds a person, who can access private data\.
@ -34,4 +34,4 @@ git secret tell [\-m] [\-d dir] [emails]\.\.\.
Run \fBman git\-secret\-tell\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR, git\-secret\-killperson(1) \fIhttp://git\-secret\.io/git\-secret\-killperson\fR
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR, git\-secret\-cat(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR, git\-secret\-killperson(1) \fIhttp://git\-secret\.io/git\-secret\-killperson\fR

@ -26,4 +26,4 @@ Run `man git-secret-tell` to see this note.
## SEE ALSO
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal), [git-secret-killperson(1)](http://git-secret.io/git-secret-killperson)
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal), [git-secret-cat(1)](http://git-secret.io/git-secret-cat), [git-secret-killperson(1)](http://git-secret.io/git-secret-killperson)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-USAGE" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-USAGE" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-usage\fR \- prints all the available commands\.
@ -29,4 +29,4 @@ git secret usage
Run \fBman git\-secret\-usage\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR, git\-secret\-cat(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR

@ -22,4 +22,4 @@ Run `man git-secret-usage` to see this note.
## SEE ALSO
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal), [git-secret-cat(1)](http://git-secret.io/git-secret-cat)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-WHOKNOWS" "1" "February 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET\-WHOKNOWS" "1" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-whoknows\fR \- prints email\-labels for each key in the keyring\.
@ -29,4 +29,4 @@ git secret whoknows
Run \fBman git\-secret\-whoknows\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-list(1) \fIhttp://git\-secret\.io/git\-secret\-list\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
git\-secret\-list(1) \fIhttp://git\-secret\.io/git\-secret\-list\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR, git\-secret\-cat(1) \fIhttp://git\-secret\.io/git\-secret\-cat\fR

@ -22,4 +22,4 @@ Run `man git-secret-whoknows` to see this note.
## SEE ALSO
[git-secret-list(1)](http://git-secret.io/git-secret-list), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
[git-secret-list(1)](http://git-secret.io/git-secret-list), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal), [git-secret-cat(1)](http://git-secret.io/git-secret-cat)

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET" "7" "March 2017" "sobolevn" "git-secret"
.TH "GIT\-SECRET" "7" "April 2018" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\fR
@ -55,10 +55,25 @@ You can configure several things to suit your workflow better\. To do so, just s
These settings are available to be changed:
.
.IP "\(bu" 4
\fB$SECRETS_GPG_COMMAND\fR \- sets the \fBgpg\fR alternatives, defaults to \fBgpg\fR\. It can be changed to \fBgpg\fR, \fBgpg2\fR, \fBpgp\fR, \fB/usr/local/gpg\fR or any other value\. After doing so rerun tests to be sure, that it won\'t break anything\. Tested to be working with: \fBgpg\fR, \fBgpg2\fR\.
\fB$SECRETS_GPG_COMMAND\fR \- sets the \fBgpg\fR alternatives, defaults to \fBgpg\fR\. It can be changed to \fBgpg\fR, \fBgpg2\fR, \fBpgp\fR, \fB/usr/local/gpg\fR or any other value\. After doing so rerun the tests to be sure that it won\'t break anything\. Tested to be working with: \fBgpg\fR, \fBgpg2\fR\.
.
.IP "\(bu" 4
\fB$SECRETS_EXTENSION\fR \- sets the secret files extension, defaults to \fB\.secret\fR\. It can be changed to any valid file extension\.
.
.IP "" 0
.
.SH "Internals"
.
.SS "<code>\.gitsecret</code> folder"
This folder contains every piece of information about the project\. It stores:
.
.IP "\(bu" 4
public keys for the project
.
.IP "\(bu" 4
path mappings\. Or in other words: what files are tracked to be hidden and revealed
.
.IP "" 0
.
.P
This folder should not be ignored\. In case it is application would not work raising an error: \fB\'\.gitsecret/\' is ignored\. abort\.\'\fR\. However, it is possible to ignore individual files \fIhttps://github\.com/sobolevn/git\-secret/issues/93\fR inside it: \fBrandom_seed\fR would be the most popular example\.

@ -24,7 +24,7 @@ You can configure several things to suit your workflow better. To do so, just se
These settings are available to be changed:
* `$SECRETS_GPG_COMMAND` - sets the `gpg` alternatives, defaults to `gpg`. It can be changed to `gpg`, `gpg2`, `pgp`, `/usr/local/gpg` or any other value. After doing so rerun the tests to be sure, that it won't break anything. Tested to be working with: `gpg`, `gpg2`.
* `$SECRETS_GPG_COMMAND` - sets the `gpg` alternatives, defaults to `gpg`. It can be changed to `gpg`, `gpg2`, `pgp`, `/usr/local/gpg` or any other value. After doing so rerun the tests to be sure that it won't break anything. Tested to be working with: `gpg`, `gpg2`.
* `$SECRETS_EXTENSION` - sets the secret files extension, defaults to `.secret`. It can be changed to any valid file extension.
## Internals

@ -0,0 +1,40 @@
#!/usr/bin/env bash
function cat {
local homedir=''
local passphrase=''
OPTIND=1
while getopts 'hd:p:' opt; do
case "$opt" in
h) _show_manual_for 'cat';;
p) passphrase=$OPTARG;;
d) homedir=$OPTARG;;
*) _invalid_option_for 'cat';;
esac
done
shift $((OPTIND-1))
[ "$1" = '--' ] && shift
_user_required
# Command logic:
for line in "$@"
do
local filename
local path
filename=$(_get_record_filename "$line")
path=$(_append_root_path "$filename")
# The parameters are: filename, write-to-file, force, homedir, passphrase
_decrypt "$path" "0" "0" "$homedir" "$passphrase"
done
}

@ -19,7 +19,7 @@ function usage {
# to the old dynamic-loading version of this code.
# thanks to @antmak it is now fixed, see:
# https://github.com/sobolevn/git-secret/issues/47
local commands="add|changes|clean|hide|init|killperson|list|remove|reveal|tell|usage|whoknows"
local commands="add|cat|changes|clean|hide|init|killperson|list|remove|reveal|tell|usage|whoknows"
echo "usage: git secret [$commands]"
}

@ -1,4 +1,4 @@
#!/usr/bin/env bash
# shellcheck disable=2034
GITSECRET_VERSION='0.2.3'
GITSECRET_VERSION='0.2.4'

@ -0,0 +1,44 @@
#!/usr/bin/env bats
load _test_base
FILE_TO_HIDE="file_to_hide"
FILE_CONTENTS="hidden content юникод"
FINGERPRINT=""
function setup {
FINGERPRINT=$(install_fixture_full_key "$TEST_DEFAULT_USER")
set_state_initial
set_state_git
set_state_secret_init
set_state_secret_tell "$TEST_DEFAULT_USER"
set_state_secret_add "$FILE_TO_HIDE" "$FILE_CONTENTS"
set_state_secret_hide
}
function teardown {
uninstall_fixture_full_key "$TEST_DEFAULT_USER" "$FINGERPRINT"
unset_current_state
}
@test "run 'cat' with password argument" {
local password=$(test_user_password "$TEST_DEFAULT_USER")
run git secret cat -d "$TEST_GPG_HOMEDIR" -p "$password" "$FILE_TO_HIDE"
[ "$status" -eq 0 ]
# $output is the output from 'git secret cat' above
# note that currently content may differ by a newline
[ "$FILE_CONTENTS" == "$output" ]
}
@test "run 'cat' with wrong filename" {
run git secret reveal -d "$TEST_GPG_HOMEDIR" -p "$password" NO_SUCH_FILE
[ "$status" -eq 2 ]
}

@ -24,7 +24,8 @@ function integration_tests {
# Testing the installation:
apk info | grep "git-secret"
which "git-secret"
# lint says to use 'command -v' and not 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

@ -24,7 +24,8 @@ function integration_tests {
# Testing the installation:
dpkg --get-selections | grep "git-secret"
which "git-secret"
# lint says to use 'command -v' and not 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

@ -18,7 +18,8 @@ function integration_tests {
make install
# Testing the installation:
which "git-secret"
# 'command -v' is like 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

@ -24,7 +24,8 @@ function integration_tests {
# Testing the installation:
dnf info "git-secret"
which "git-secret"
# 'command -v' is like 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

Loading…
Cancel
Save