Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
/ git-encrypt Public archive

A tool that allows you to encrypt git files.

Notifications You must be signed in to change notification settings

clipido/git-encrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-encrypt

A tool that allows you to encrypt files in your git repository.

Installation

Add an .npmrc file to your project where you want to install git-encrypt:

# .npmrc
@stadro:registry=https://npm.pkg.github.com

Install locally:

$ yarn add @stadro/git-encrypt

Install globally:

$ yarn global install @stadro/git-encrypt

Development

Install all the packages of needed to run git-encrypt:

yarn install

For local development you can run:

yarn dev <args>

To install git-encrypt globally for development you can run:

# Linux
$ yarn i

# Windows
$ yarn i:win

Usage

To initialize git-encrypt in a git repository run:

# Install git hooks, generate a key and display it to the user.
# git-encrypt will now automatically encrypt files on git commit.
# git-encrypt will also automatically decrypt files on git pull.
$ git-encrypt init

If you already have a key, you can provide that key to the init command:

# Install git hooks and store the provided key
$ git-encrypt init --key <key>

Because encrypted files must be ignored, you can add all the files you want to encrypt to your .gitignore file. To make sure git-encrypt knows which files to encrypt make sure to surround those files with #start:enc and #end:enc.

# .gitignore
#start:enc
secret.txt
#end:enc

To encrypt or decrypt files manually, you can run:

$ git-encrypt encrypt --key <key>
$ git-encrypt decrypt --key <key>

To generate a key manually, you can run:

$ git-encrypt generate

To view or set the current key, you can run:

# You can also set a new key if you provide --key <key>
$ git-encrypt key

About

A tool that allows you to encrypt git files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages