Skip to content

vdutts7/secure-git-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

secure-git-template

opinionated private repo bootstrap with one command setup

shelllock   git-crypt  


Table Of Contents


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

brew tap vdutts7/tap && brew install shelllock git-crypt git-lfs && git lfs install && \
git clone <your-repo-url> && cd <your-repo-dir> && \
./.hooks/scripts/setup.sh --remote "<your-remote-url>" --name "<git-name>" --email "<git-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

.hooks/scripts/setup.sh --remote "<your-remote-url>" --name "<git-name>" --email "<git-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:

# 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

Contact

vd7.io   /vdutts7

About

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)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages