https://github.com/andrebriggs/git-crypt-demo
https://github.com/andrebriggs/git-crypt-demo
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/andrebriggs/git-crypt-demo
- Owner: andrebriggs
- Created: 2019-11-21T10:38:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-27T10:16:02.000Z (over 6 years ago)
- Last Synced: 2025-03-04T21:42:18.615Z (over 1 year ago)
- Language: Shell
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-crypt automated walkthrough
## Requirements
Run `brew install git-crypt` to install [git-crypt](https://github.com/AGWA/git-crypt)
## Instructions
Run `sh demo-encryption.sh` and view the output. It will look something like this:
$ sh example.sh
Initialized empty Git repository in /private/var/folders/lj/9dqdzw193jg2jhjp9x19fyb00000gn/T/git-crypt-example.qadG8zCJ/.git/
Generating key...
[master (root-commit) 56f46ae] Initial commit
2 files changed, 2 insertions(+)
create mode 100644 .gitattributes
create mode 100644 README.md
encrypted: config.secret.yaml
not encrypted: config.yaml
not encrypted: .gitattributes
not encrypted: README.md
[master ec04ae9] Adding yaml files
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 config.secret.yaml
create mode 100644 config.yaml
Notice that `config.secret.yaml` is encrypted but `config.yaml` is not. If we were to push the created git repo to a remote origin the `config.secret.yaml` file would be encrypted. You can see an example live repo [here](https://github.com/andrebriggs/git-crypt-demo-example)
## Use Cases
A pattern like this can be used in CI/CD orchestrations such as Azure DevOps pipelines to provide plain sight encryption to files. This could be useful in GitOps patterns where obfuscation via environment variables might not be preferred.