An open API service indexing awesome lists of open source software.

https://github.com/vdutts7/secure-git-template

Portable template that includes: file-level encryption, touchID-gated branch pushing, metadata leak-prevention, pre-push security checks. Works on any Git provider (Github, Gitlab, Bitbucket, etc)
https://github.com/vdutts7/secure-git-template

git-crypt template touchid

Last synced: 16 days ago
JSON representation

Portable template that includes: file-level encryption, touchID-gated branch pushing, metadata leak-prevention, pre-push security checks. Works on any Git provider (Github, Gitlab, Bitbucket, etc)

Awesome Lists containing this project

README

          

logo

secure-git-template


opinionated private repo bootstrap with one command setup

shelllock  
git-crypt  


## Table Of Contents

- [About](#about)
- [Install](#install)
- [Usage](#usage)
- [Requirements](#requirements)
- [Contact](#contact)

___

## About

- **problem** - private repos drift into inconsistent local setup and weak guardrails
- **solution** - force one install path and one setup command with hooks + identity + encryption
- **summary** - clone, run command, store key, commit, push

___

## Install

```bash
brew tap vdutts7/tap && brew install shelllock git-crypt git-lfs && git lfs install && \
git clone && cd && \
./.hooks/scripts/setup.sh --remote "" --name "" --email "" --pseudo-encrypt-commits --git-crypt --key-output "$HOME/Downloads/git-crypt-key" && \
open "$HOME/Downloads" && rm "$HOME/Downloads/git-crypt-key" && \
git add . && git commit -m "initial setup" && git push -u origin main
```

___

## Usage

```bash
.hooks/scripts/setup.sh --remote "" --name "" --email "" --pseudo-encrypt-commits --git-crypt --key-output "$HOME/Downloads/git-crypt-key"
```

| Arg | Purpose |
|---|---|
| `--remote` | set or replace `origin` |
| `--name` | set repo-local `user.name` in `.git/config` |
| `--email` | set repo-local `user.email` in `.git/config` |
| `--pseudo-encrypt-commits` | obfuscate commit messages as `..` and log originals to `.commits.jsonl` |
| `--git-crypt` | initialize `git-crypt` and activate `.gitattributes` encryption rule |
| `--key-output` | export git-crypt key file |

Examples:

```bash
# full setup
./.hooks/scripts/setup.sh --remote "git@github.com:owner/repo.git" --name "your-name" --email "your-email@example.com" --pseudo-encrypt-commits --git-crypt --key-output "$HOME/Downloads/git-crypt-key"

# first push
git add . && git commit -m "initial setup" && git push -u origin main
```

___

## Requirements

- `shelllock`
- `git-crypt`
- `git-lfs`

___

## Tools Used

git-crypt
Git LFS


## Contact

vd7.io   /vdutts7

[git]: https://img.shields.io/badge/Git-181717?style=for-the-badge&logo=github&logoColor=white
[github-url]: https://github.com/vdutts7/secure-git-template
[homebrew]: https://img.shields.io/badge/Homebrew-FBB040?style=for-the-badge&logo=homebrew&logoColor=black
[homebrew-url]: https://github.com/vdutts7/homebrew-tap