Issue 603 docs part3 (#612)

* update man pages for changes to git-secret.7
* update changelog for doc changes
pull/601/head
Josh Rabinowitz 4 years ago committed by GitHub
parent 71f7891d88
commit 332a9b4794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,6 +12,7 @@
### Misc
- Improve docs about using gpg with git-secret (#577)
- Text improvements and More about security in git-secret.7 man page (#603)
- Reflect changes in ruby bundler during build process
- Upgrade build process to ansible 2.9
- Use shellcheck 0.7.1 with CI, not 'latest' (#609)

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

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-CAT" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-CAT" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-cat\fR \- decrypts files passed on command line to stdout

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-CHANGES" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-CHANGES" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-changes\fR \- view diff of 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\-CLEAN" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-CLEAN" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.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" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-HIDE" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-hide\fR \- encrypts all added files with 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\-INIT" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-INIT" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.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" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-KILLPERSON" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.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" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-LIST" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-list\fR \- prints all the added files\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-REMOVE" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-REMOVE" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.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" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-REVEAL" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-reveal\fR \- decrypts all added files\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-TELL" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-TELL" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-tell\fR \- adds a person, who can access private data\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-USAGE" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-USAGE" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-usage\fR \- prints all the available commands\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-WHOKNOWS" "1" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET\-WHOKNOWS" "1" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\-whoknows\fR \- prints email\-labels for each key in the keyring\.

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET" "7" "March 2020" "sobolevn" "git-secret 0.3.2"
.TH "GIT\-SECRET" "7" "September 2020" "sobolevn" "git-secret 0.3.2"
.
.SH "NAME"
\fBgit\-secret\fR \- bash tool to store private data inside a git repo\.
@ -10,25 +10,25 @@
These steps cover the basic process of using \fBgit\-secret\fR:
.
.IP "1." 4
Before starting, \fImake sure you have created \fBgpg\fR RSA key\-pair\fR: public and secret key identified by your email address\.
Before starting, \fImake sure you have created a \fBgpg\fR RSA key\-pair\fR: a public and a secret key identified by your email address\.
.
.IP "2." 4
Begin with an existing or new git repository\. You\'ll use the \'git secret\' commands to add the keyrings and information to make the git\-secret hide and reveal files in this repository\.
Begin with an existing or new git repository\. You\'ll use the \'git secret\' commands to add the keyrings and information to make \fBgit\-secret\fR hide and reveal files in this repository\.
.
.IP "3." 4
Initialize the \fBgit\-secret\fR repository by running \fBgit secret init\fR command\. the \fB\.gitsecret/\fR folder will be created, \fBNote\fR all the contents of the \fB\.gitsecret/\fR folder should be checked in, /except/ the \fBrandom_seed\fR file\. In other words, of the files in \.gitsecret, only the random_seed file should be mentioned in your \.gitignore file\.
Initialize the \fBgit\-secret\fR repository by running \fBgit secret init\fR command\. The \fB\.gitsecret/\fR folder will be created\. \fBNote\fR all the contents of the \fB\.gitsecret/\fR folder should be checked in, \fB/except/\fR the \fBrandom_seed\fR file\. In other words, of all the files in \fB\.gitsecret/\fR, only the \fBrandom_seed\fR file should be mentioned in your \fB\.gitignore\fR file\. By default, \fBgit secret init\fR will add the file \fB\.gitsecret/keys/random_seed\fR to your \fB\.gitignore\fR file\.
.
.IP "4." 4
Add the first user to the git\-secret repo keyring by running \fBgit secret tell your@gpg\.email\fR\.
Add the first user to the \fBgit\-secret\fR repo keyring by running \fBgit secret tell your@gpg\.email\fR\.
.
.IP "5." 4
Now it\'s time to add files you wish to encrypt inside the \fBgit\-secret\fR repository\. It can be done by running \fBgit secret add <filenames\.\.\.>\fR command\. Make sure these files are ignored by mentions in \.gitignore, otherwise \fBgit\-secret\fR won\'t allow you to add them, as these files could be stored unencrypted\.
Now it\'s time to add files you wish to encrypt inside the \fBgit\-secret\fR repository\. This can be done by running \fBgit secret add <filenames\.\.\.>\fR command\. Make sure these files are ignored by mentions in \fB\.gitignore\fR, otherwise \fBgit\-secret\fR won\'t allow you to add them, as these files could be stored unencrypted\. In the default configuration, \fBgit\-secret add\fR will automatically add the unencrypted versions of the files to \fB\.gitignore\fR for you\.
.
.IP "6." 4
When done, run \fBgit secret hide\fR to encrypt all files which you have added by the \fBgit secret add\fR command\. The data will be encrypted with the public\-keys described by the \fBgit secret tell\fR command\. After using \fBgit secret hide\fR to encrypt your data, it is safe to commit your changes\. \fBNOTE:\fR\. It\'s recommended to add \fBgit secret hide\fR command to your \fBpre\-commit\fR hook, so you won\'t miss any changes\.
When done, run \fBgit secret hide\fR to encrypt all files which you have added by the \fBgit secret add\fR command\. The data will be encrypted with the public\-keys described by the \fBgit secret tell\fR command\. After using \fBgit secret hide\fR to encrypt your data, it is safe to commit your changes\. \fBNOTE:\fR It\'s recommended to add the \fBgit secret hide\fR command to your \fBpre\-commit\fR hook, so you won\'t miss any changes\.
.
.IP "7." 4
Later you can decrypt files with the \fBgit secret reveal\fR command, or just show their contents to stdout with the \fBgit secret cat\fR command\. If you used a password on your GPG key (always recommended), it will ask you for your password\. And you\'re done!
Later you can decrypt files with the \fBgit secret reveal\fR command, or just print their contents to stdout with the \fBgit secret cat\fR command\. If you used a password on your GPG key (always recommended), it will ask you for your password\. And you\'re done!
.
.IP "" 0
.
@ -38,13 +38,13 @@ Later you can decrypt files with the \fBgit secret reveal\fR command, or just sh
\fIGet their \fBgpg\fR public\-key\fR\. \fBYou won\'t need their secret key\.\fR
.
.IP "2." 4
Import this key into your \fBgpg\fR setup (in ~/\.gnupg or similar) by running \fBgpg \-\-import KEY_NAME\.txt\fR
Import this key into your \fBgpg\fR keyring (in \fB~/\.gnupg\fR or similar) by running \fBgpg \-\-import KEY_NAME\.txt\fR
.
.IP "3." 4
Now add this person to your secrets repo by running \fBgit secret tell persons@email\.id\fR (this will be the email address associated with the public key)
.
.IP "4." 4
The newly added user cannot yet read the encrypted files\. Now, re\-encrypt the files using \fBgit secret reveal; git secret hide \-d\fR, and then commit and push the newly encrypted files\. (The \-d options deletes the unencrypted file after re\-encrypting it)\. Now the newly added user be able to decrypt the files in the repo using \fBgit\-secret\fR\.
The newly added user cannot yet read the encrypted files\. Now, re\-encrypt the files using \fBgit secret reveal; git secret hide \-d\fR, and then commit and push the newly encrypted files\. (The \-d options deletes the unencrypted file after re\-encrypting it)\. Now the newly added user will be able to decrypt the files in the repo using \fBgit\-secret reveal\fR\.
.
.IP "" 0
.
@ -52,7 +52,7 @@ The newly added user cannot yet read the encrypted files\. Now, re\-encrypt the
Note that it is possible to add yourself to the git\-secret repo without decrypting existing files\. It will be possible to decrypt them after re\-encrypting them with the new keyring\. So, if you don\'t want unexpected keys added, you can configure some server\-side security policy with the \fBpre\-receive\fR hook\.
.
.SS "Using gpg"
You can follow a quick gpg tutorial at https://www\.devdungeon\.com/content/gpg\-tutorial\. Here are the most useful commands to get started:
You can follow a quick \fBgpg\fR tutorial at devdungeon \fIhttps://www\.devdungeon\.com/content/gpg\-tutorial\fR\. Here are the most useful commands to get started:
.
.P
To generate a RSA key\-pair, run:
@ -94,10 +94,10 @@ gpg \-\-import public\-key\.gpg
.IP "" 0
.
.P
Be sure to use a secure channel to share your public key!
To make sure you get the original public keys of the indicated persons, be sure to use a secure channel to transfer it, or use a service you trust, preferably one that uses encryption such as Keybase, to retrieve their public key\. Otherwise you could grant the wrong person access to your secrets by mistake!
.
.SS "Using git\-secret for Continuous Integration / Continuous Deployment (CI/CD)"
When using git\-secret for CI/CD, you get the benefit that any deployment is necessarily done with the correct configuration, since it is collocated with the changes in your code\.
When using \fBgit\-secret\fR for CI/CD, you get the benefit that any deployment is necessarily done with the correct configuration, since it is collocated with the changes in your code\.
.
.P
One way of doing it is the following:
@ -163,7 +163,7 @@ echo $GPG_PRIVATE_KEY | tr \',\' \'\en\' > \./private_key\.gpg
.IP "" 0
.
.SH "Environment Variables and Configuration"
You can configure the version of gpg used, or the extension your encrypted files use, to suit your workflow better\. To do so, just set the required variable to the value you need\. This can be done in your shell environment file or with each \fBgit\-secret\fR command\.
You can configure the version of \fBgpg\fR used, or the extension your encrypted files use, to suit your workflow better\. To do so, just set the required variable to the value you need\. This can be done in your shell environment file or with each \fBgit\-secret\fR command\. See below, or the man page of \fBgit\-secret\fR for an explanation of the environment variables \fBgit\-secret\fR uses\.
.
.P
The settings available to be changed are:
@ -213,7 +213,7 @@ All the other internal data is stored in the directory:
This directory contains data used by git\-secret and PGP to allow and maintain the correct encryption and access rights for the permitted parties\.
.
.P
Generally speaking, all the files in this directory \fIexcept\fR \fBrandom_seed\fR should be checked into your repo\. By default, \fBgit secret init\fR will add the file \fB\.gitsecret/keys/random_seed\fR to your \.gitignore file\.
Generally speaking, all the files in this directory \fIexcept\fR \fBrandom_seed\fR should be checked into your repo\. By default, \fBgit secret init\fR will add the file \fB\.gitsecret/keys/random_seed\fR to your \fB\.gitignore\fR file\.
.
.P
Again, you can change the name of this directory using the SECRETS_DIR environment variable\.

Loading…
Cancel
Save